Tabnine Logo
Graphics2D
Code IndexAdd Tabnine to your IDE (free)

How to use
Graphics2D
in
java.awt

Best Java code snippets using java.awt.Graphics2D (Showing top 20 results out of 12,600)

Refine searchRefine arrow

  • BufferedImage
  • Graphics
  • Window
  • JFrame
  • Container
  • Dimension
  • Component
origin: linlinjava/litemall

private void drawTextInImgCenter(BufferedImage baseImage, String textToWrite, int y) {
  Graphics2D g2D = (Graphics2D) baseImage.getGraphics();
  g2D.setColor(new Color(167, 136, 69));
  String fontName = "Microsoft YaHei";
  Font f = new Font(fontName, Font.PLAIN, 28);
  g2D.setFont(f);
  g2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
  // 计算文字长度,计算居中的x点坐标
  FontMetrics fm = g2D.getFontMetrics(f);
  int textWidth = fm.stringWidth(textToWrite);
  int widthX = (baseImage.getWidth() - textWidth) / 2;
  // 表示这段文字在图片上的位置(x,y) .第一个是你设置的内容。
  g2D.drawString(textToWrite, widthX, y);
  // 释放对象
  g2D.dispose();
}
origin: jMonkeyEngine/jmonkeyengine

private static BufferedImage scaleDown(BufferedImage sourceImage, int targetWidth, int targetHeight) {
  int sourceWidth  = sourceImage.getWidth();
  int sourceHeight = sourceImage.getHeight();
  BufferedImage targetImage = new BufferedImage(targetWidth, targetHeight, sourceImage.getType());
  Graphics2D g = targetImage.createGraphics();
  g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
  g.drawImage(sourceImage, 0, 0, targetWidth, targetHeight, 0, 0, sourceWidth, sourceHeight, null);
  g.dispose();
  return targetImage;
}
origin: libgdx/libgdx

  private static BufferedImage createImage (int width, int height, Color color) {
    BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
    Graphics2D g = image.createGraphics();
    g.setColor(color);
    g.fillRect(0, 0, width, height);
    g.dispose();
    return image;
  }
}
origin: skylot/jadx

private void applyRenderHints(Graphics g) {
  if (g instanceof Graphics2D) {
    Graphics2D g2d = (Graphics2D) g;
    if (DESKTOP_HINTS != null) {
      g2d.setRenderingHints(DESKTOP_HINTS);
    } else {
      g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
      g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
      g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
    }
  }
}
origin: libgdx/libgdx

/** Returns an image that can be used by effects as a temp image. */
static public BufferedImage getScratchImage () {
  Graphics2D g = (Graphics2D)scratchImage.getGraphics();
  g.setComposite(AlphaComposite.Clear);
  g.fillRect(0, 0, GlyphPage.MAX_GLYPH_SIZE, GlyphPage.MAX_GLYPH_SIZE);
  g.setComposite(AlphaComposite.SrcOver);
  g.setColor(java.awt.Color.white);
  return scratchImage;
}
origin: stackoverflow.com

Graphics2D g2d = (Graphics2D) g.create();
g2d.setColor(new Color(0xFFAA00));
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setStroke(basicStroke);
g2d.drawRoundRect(3, 3, getWidth()-4, getHeight()-4, archH, archH);
setLayout(new GridBagLayout()); 
add(usrNameLabel, labCnst);
add(usrNameFeild, txtCnst);
comp.setFont(getFont().deriveFont(Font.BOLD, 13));
Rectangle2D txRect = new Rectangle2D.Double(0, 0, textureImg.getWidth(), textureImg.getHeight());
TexturePaint txPaint = new TexturePaint(textureImg, txRect);
g2d.setPaint(txPaint);
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f));
if(gradientImage==null || gradientImage.getHeight() != getHeight())
  g2d.setPaint(lgrPaint);
    JFrame frame = new JFrame("Demo: LogIn Dialogue");
origin: stackoverflow.com

return new Dimension(image.getWidth(), image.getHeight());
int w = old.getWidth();
int h = old.getHeight();
BufferedImage img = new BufferedImage(
    w, h, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = img.createGraphics();
g2d.drawImage(old, 0, 0, null);
g2d.setPaint(Color.red);
g2d.setFont(new Font("Serif", Font.BOLD, 20));
String s = "Hello, world!";
FontMetrics fm = g2d.getFontMetrics();
int x = img.getWidth() - fm.stringWidth(s) - 5;
int y = fm.getHeight();
g2d.drawString(s, x, y);
g2d.dispose();
return img;
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(new TextOverlay());
f.pack();
f.setVisible(true);
origin: stackoverflow.com

BufferedImage img = new BufferedImage(PREF_W, PREF_H,
   BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = img.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
   RenderingHints.VALUE_ANTIALIAS_ON);
g2.setStroke(BASIC_STROKE);
g2.setColor(Color.blue);
int circleCount = 10;
for (int i = 0; i < circleCount ; i++) {
  int w = PREF_W - 2 * x;
  int h = w;
  g2.drawOval(x, y, w, h);
g2.dispose();
return img;
BufferedImage img = new BufferedImage(PREF_W, PREF_H,
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
   RenderingHints.VALUE_ANTIALIAS_ON);
g2.setStroke(BASIC_STROKE);
  g2.setComposite(comp );
return new Dimension(PREF_W, PREF_H);
origin: stackoverflow.com

+ "The effect we want is a multi-line label.";
JFrame f = new JFrame("Label Render Test");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
BufferedImage image = new BufferedImage(
  400,
  300,
  BufferedImage.TYPE_INT_RGB);
Graphics2D imageGraphics = image.createGraphics();
GradientPaint gp = new GradientPaint(
  20f,
  280f,
  Color.orange);
imageGraphics.setPaint(gp);
imageGraphics.fillRect(0, 0, 400, 300);
textLabel.setSize(textLabel.getPreferredSize());
JLabel imageLabel = new JLabel(ii);
f.getContentPane().add(imageLabel);
f.pack();
f.setLocationByPlatform(true);
f.setVisible(true);
origin: stackoverflow.com

    frame.pack();
    frame.setVisible(true);
this.setPreferredSize(new Dimension(
  image.getWidth(null), image.getHeight(null)));
this.addMouseListener(new MouseAdapter() {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
g2d.translate(this.getWidth() / 2, this.getHeight() / 2);
g2d.rotate(theta);
g2d.translate(-image.getWidth(this) / 2, -image.getHeight(this) / 2);
g2d.drawImage(image, 0, 0, null);
return new Dimension(SIZE, SIZE);
BufferedImage bi = new BufferedImage(
  size, size, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = bi.createGraphics();
g2d.setRenderingHint(
  RenderingHints.KEY_ANTIALIASING,
  RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setPaint(Color.getHSBColor(r.nextFloat(), 1, 1));
g2d.setStroke(new BasicStroke(size / 8));
g2d.drawLine(0, size / 2, size, size / 2);
g2d.drawLine(size / 2, 0, size / 2, size);
origin: kevin-wayne/algs4

private void init() {
  if (frame != null) frame.setVisible(false);
  frame = new JFrame();
  offscreenImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
  onscreenImage  = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
  offscreen = offscreenImage.createGraphics();
  onscreen  = onscreenImage.createGraphics();
  setXscale();
  setYscale();
  offscreen.setColor(DEFAULT_CLEAR_COLOR);
  offscreen.fillRect(0, 0, width, height);
  setPenColor();
  setPenRadius();
                       RenderingHints.VALUE_ANTIALIAS_ON);
  hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
  offscreen.addRenderingHints(hints);
  draw.addMouseMotionListener(this);
  frame.setContentPane(draw);
  frame.addKeyListener(this);    // JLabel cannot get keyboard focus
  frame.setResizable(false);
origin: stackoverflow.com

addMouseListener(myMouseAdapter);
addMouseMotionListener(myMouseAdapter);
return new Dimension(PREF_W, PREF_H);
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
   RenderingHints.VALUE_ANTIALIAS_ON);
g2.setStroke(STROKE);
g.setColor(POINTS_COLOR);
for (List<Point> pointList : pointsList) {
  if (pointList.size() > 1) {
     int x2 = p2.x;
     int y2 = p2.y;
     g.drawLine(x1, y1, x2, y2);
     p1 = p2;
g.setColor(CURRENT_POINTS_COLOR);
if (currentPointList != null && currentPointList.size() > 1) {
  Point p1 = currentPointList.get(0);
  currentPointList = new ArrayList<Point>();
  currentPointList.add(mEvt.getPoint());
  repaint();
origin: stackoverflow.com

canvas = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
fillCanvas(Color.BLUE);
drawRect(Color.RED, 0, 0, width/2, height/2);
return new Dimension(canvas.getWidth(), canvas.getHeight());
super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
g2.drawImage(canvas, null, null);
repaint();
repaint();
repaint();
int width = 640;
int height = 480;
JFrame frame = new JFrame("Direct draw demo");
frame.add(panel);
frame.pack();
frame.setVisible(true);
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
origin: stackoverflow.com

super.paintComponent(g);
Graphics2D g2 = (Graphics2D) g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(Color.WHITE);
g2.fillRect(padding + labelPadding, padding, getWidth() - (2 * padding) - labelPadding, getHeight() - 2 * padding - labelPadding);
g2.setColor(Color.BLACK);
    g2.drawString(yLabel, x0 - labelWidth - 5, y0 + (metrics.getHeight() / 2) - 3);
      g2.drawString(xLabel, x0 - labelWidth / 2, y0 + metrics.getHeight() + 3);
Stroke oldStroke = g2.getStroke();
g2.setColor(lineColor);
g2.setStroke(GRAPH_STROKE);
for (int i = 0; i < graphPoints.size() - 1; i++) {
  int x1 = graphPoints.get(i).x;
g2.setStroke(oldStroke);
invalidate();
this.repaint();
origin: libgdx/libgdx

if (scale <= 0) throw new IllegalArgumentException("scale cannot be <= 0: " + scale);
int width = image.getWidth(), height = image.getHeight();
if (image.getType() != BufferedImage.TYPE_4BYTE_ABGR) {
  BufferedImage newImage = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
  newImage.getGraphics().drawImage(image, 0, 0, null);
  image = newImage;
  height -= 2;
  BufferedImage newImage = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
  newImage.getGraphics().drawImage(image, 0, 0, width, height, 1, 1, width + 1, height + 1, null);
  image = newImage;
  BufferedImage newImage = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
  if (scale < 1) {
    newImage.getGraphics().drawImage(image.getScaledInstance(width, height, Image.SCALE_AREA_AVERAGING), 0, 0, null);
  } else {
    Graphics2D g = (Graphics2D)newImage.getGraphics();
    g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, resampling.value);
    g.drawImage(image, 0, 0, width, height, null);
origin: stackoverflow.com

final JFrame frame = new JFrame("Nested Layout Example");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
plafComponents.add(plafChooser);
plafComponents.add(pack);
gui.add(plafComponents, BorderLayout.NORTH);
  new TitledBorder("GridBagLayout()") );
BufferedImage bi = new BufferedImage(
  200,200,BufferedImage.TYPE_INT_ARGB);
Graphics2D g = bi.createGraphics();
GradientPaint gp = new GradientPaint(
  20f,20f,Color.red, 180f,180f,Color.yellow);
g.setPaint(gp);
g.fillRect(0,0,200,200);
ImageIcon ii = new ImageIcon(bi);
JLabel imageLabel = new JLabel(ii);
gui.add( splitPane, BorderLayout.CENTER );
frame.setContentPane(gui);
frame.pack();
frame.setLocationRelativeTo(null);
origin: stackoverflow.com

private JFrame frame = new JFrame("sssssssss");
private JButton tip1Null = new JButton(" test button ");
  tip1Null.setFont(new Font("Serif", Font.BOLD, 14));
  tip1Null.setForeground(Color.darkGray);
  tip1Null.setPreferredSize(new Dimension(50, 30));
  tip1Null.addActionListener(new java.awt.event.ActionListener() {
    @Override
  ((Graphics2D) g).setRenderingHint(
    RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
  g.setColor(color);
  g.drawRoundRect(x, y, width, height, MARGIN, MARGIN);
    0.0F, (float) c.getHeight() / (float) 2, color1, 0.0F, 0.0F, color2);
  Rectangle rec1 = new Rectangle(0, 0, c.getWidth(), c.getHeight() / 2);
  g2D.setPaint(gradient1);
  g2D.fill(rec1);
  GradientPaint gradient2 = new GradientPaint(
    0.0F, (float) c.getHeight() / (float) 2, color3, 0.0F, c.getHeight(), color4);
  Rectangle rec2 = new Rectangle(0, c.getHeight() / 2, c.getWidth(), c.getHeight());
  g2D.setPaint(gradient2);
  g2D.fill(rec2);
  paintText(g, b, b.getBounds(), b.getText());
  g.setColor(Color.red.brighter());
  g.fillRect(0, 0, b.getSize().width, b.getSize().height);
origin: stackoverflow.com

super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.drawLine(BORDER_GAP, getHeight() - BORDER_GAP, BORDER_GAP, BORDER_GAP);
g2.drawLine(BORDER_GAP, getHeight() - BORDER_GAP, getWidth() - BORDER_GAP, getHeight() - BORDER_GAP);
  int y0 = getHeight() - (((i + 1) * (getHeight() - BORDER_GAP * 2)) / Y_HATCH_CNT + BORDER_GAP);
  int y1 = y0;
  g2.drawLine(x0, y0, x1, y1);
Stroke oldStroke = g2.getStroke();
g2.setColor(GRAPH_COLOR);
g2.setStroke(GRAPH_STROKE);
for (int i = 0; i < graphPoints.size() - 1; i++) {
  int x1 = graphPoints.get(i).x;
g2.setStroke(oldStroke);      
g2.setColor(GRAPH_POINT_COLOR);
for (int i = 0; i < graphPoints.size(); i++) {
return new Dimension(PREF_W, PREF_H);
origin: marytts/marytts

private void createShadowPicture(BufferedImage image) {
  int width = image.getWidth();
  int height = image.getHeight();
  int extra = 0;
  if (System.getProperty("os.name").equalsIgnoreCase("Windows XP")) {
    extra = 14; // Only create shadow if Windows XP (avoids double shadow in Mac OS; not tested for other OSes)
  }
  setSize(new Dimension(width + extra, height + extra));
  setLocationRelativeTo(null);
  Rectangle windowRect = getBounds();
  splash = new BufferedImage(width + extra, height + extra, BufferedImage.TYPE_INT_ARGB);
  Graphics2D g2 = (Graphics2D) splash.getGraphics();
  try {
    Robot robot = new Robot(getGraphicsConfiguration().getDevice());
    BufferedImage capture = robot.createScreenCapture(new Rectangle(windowRect.x, windowRect.y, windowRect.width + extra,
        windowRect.height + extra));
    g2.drawImage(capture, null, 0, 0);
  } catch (AWTException e) {
  }
  BufferedImage shadow = new BufferedImage(width + extra, height + extra, BufferedImage.TYPE_INT_ARGB);
  Graphics g = shadow.getGraphics();
  g.setColor(new Color(0.0f, 0.0f, 0.0f, 0.3f));
  g.fillRoundRect(6, 6, width, height, 12, 12);
  g2.drawImage(shadow, getBlurOp(7), 0, 0);
  g2.drawImage(image, 0, 0, this);
}
origin: stackoverflow.com

this.setPreferredSize(new Dimension(SIZE, SIZE));
this.n = n;
super.paintComponent(g);
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(
  RenderingHints.KEY_ANTIALIASING,
  RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setColor(Color.black);
a = getWidth() / 2;
b = getHeight() / 2;
r = 4 * m / 5;
int r2 = Math.abs(m - r) / 2;
g2d.drawOval(a - r, b - r, 2 * r, 2 * r);
g2d.setColor(Color.blue);
for (int i = 0; i < n; i++) {
  double t = 2 * Math.PI * i / n;
  int x = (int) Math.round(a + r * Math.cos(t));
  int y = (int) Math.round(b + r * Math.sin(t));
  g2d.fillOval(x - r2, y - r2, 2 * r2, 2 * r2);
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(new CircleTest(9));
f.pack();
f.setVisible(true);
java.awtGraphics2D

Javadoc

This Graphics2D class extends the Graphics class to provide more sophisticated control over graphics operations.

Coordinate Spaces All coordinates passed to a Graphics2D object are specified in a device-independent coordinate system called User Space, which is used by applications. The Graphics2D object behaves as if it contains a transform object as part of its internal rendering state that defines how to convert coordinates from user space to device-dependent coordinates in Device Space.

Some of the operations performed by the rendering attribute objects occur in the device space, but all Graphics2D methods take user space coordinates.

Every Graphics2D object is associated with a target that defines where rendering takes place. A GraphicsConfiguration object defines the characteristics of the rendering target, such as pixel format and resolution. The same rendering target is used throughout the life of a Graphics2D object.

When creating a Graphics2D object, the GraphicsConfiguration specifies the transform for the target of the Graphics2D (a Component or Image). This transform maps the user space coordinate system to screen and printer device coordinates such that the origin maps to the upper left hand corner of the target region of the device with increasing X coordinates extending to the right and increasing Y coordinates extending downward. The scaling of the transform is set to identity for those devices that are close to 72 dpi, such as screen devices. The scaling of the transform is set to approximately 72 user space coordinates per square inch for high resolution devices, such as printers. For image buffers, the transform is the identity transform.

Rendering Process The Rendering Process can be broken down into four phases that are controlled by the Graphics2D rendering attributes. The renderer can optimize many of these steps, either by caching the results for future calls, by collapsing multiple virtual steps into a single operation, or by recognizing various attributes as common simple cases that can be eliminated by modifying other parts of the operation.

The steps in the rendering process are:

  1. Determine what to render.
  2. Constrain the rendering operation to the current Clip. The Clip is specified by a Shape in user space and is controlled by the program using the various clip manipulation methods of Graphics . This user clip is transformed into device space by the target transform and combined with the device clip, which is defined by the visibility of windows and device extents. The combination of the user clip and device clip defines the composite clip, which determines the final clipping region. The user clip is not modified by the rendering system to reflect the resulting composite clip.
  3. Determine what colors to render.
  4. Apply the colors to the destination drawing surface using the current Composite attribute in the Graphics2D context.

The three types of rendering operations, along with details of each of their particular rendering processes are:
  1. Shape operations
    1. If the operation is a draw operation, then the current Stroke attribute in the Graphics2D context is used to construct a new Shape object that contains the outline of the specified Shape.
    2. The Shape is transformed from user space to device space using the target transform in the Graphics2D context.
    3. The current Color in the Graphics2D context is used to determine the colors to render in device space.
  2. Text operations
    1. The following steps are used to determine the set of glyphs required to render the indicated String:
      1. If the argument is a String, then the current Font in the Graphics2D context is asked to convert the Unicode characters in the String into a set of glyphs for presentation with whatever basic layout and shaping algorithms the font implements.
      2. If the argument is an AttributedCharacterIterator, its embedded font attributes are used to implement more sophisticated glyph layout algorithms .
    2. The current Font is queried to obtain outlines for the indicated glyphs. These outlines are treated as shapes in user space relative to the position of each glyph that was determined in step 1.
    3. The character outlines are filled as indicated above under Shape operations.
    4. The current Color is used to determine the colors to render in device space.
  3. Image Operations
    1. The region of interest is defined by the bounding box of the source Image. This bounding box is specified in Image Space, which is the Image object's local coordinate system.
    2. In this Profile, the bounding box is always treated as if it is already in user space.
    3. The bounding box of the source Image is transformed from user space into device space using the target transform . Note that the result of transforming the bounding box does not necessarily result in a rectangular region in device space.
    4. The Image object determines what colors to render, sampled according to the source to destination coordinate mapping specified by the target transform .

Default Rendering Attributes The default values for the Graphics2D rendering attributes are: Color The color of the Component. Font The Font of the Component. Stroke A square pen with a linewidth of 1, no dashing, miter segment joins and square end caps (unless restricted - see restrictions in BasicStroke) . Composite The AlphaComposite#SRC_OVER rule. Clip No rendering Clip, the output is clipped to the Component.

Restrictions

  • Only instances of AlphaComposite are permitted when setting the Composite of the graphics context. See:
    • #setComposite
  • Only instances of BasicStroke are permitted when setting the Stroke of the graphics context. See:
    • #setStroke
    • BasicStroke
  • A Graphics2D implementation may ignore the BasicStroke attributes end cap, line join, and miter limit. See:
    • #setStroke
    • BasicStroke
    • Profile-specific properties.

Most used methods

  • setColor
  • dispose
  • drawImage
  • setRenderingHint
  • fillRect
  • drawString
  • setFont
  • setStroke
    Sets the Stroke for the Graphics2D context.
  • fill
  • setPaint
  • drawLine
  • getFontMetrics
  • drawLine,
  • getFontMetrics,
  • draw,
  • setComposite,
  • translate,
  • drawRect,
  • setTransform,
  • getFontRenderContext,
  • getTransform,
  • setClip

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ImageIO (javax.imageio)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now