@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(new Color(187, 187, 187)); g.drawLine(0, 0, getWidth(), 0); g.setColor(new Color(221, 221, 221)); g.drawLine(0, 1, getWidth(), 1); }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(new Color(187, 187, 187)); g.drawLine(0, 0, getWidth(), 0); g.setColor(new Color(221, 221, 221)); g.drawLine(0, 1, getWidth(), 1); }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(new Color(187, 187, 187)); g.drawLine(0, 0, getWidth(), 0); g.setColor(new Color(221, 221, 221)); g.drawLine(0, 1, getWidth(), 1); }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(new Color(187, 187, 187)); g.drawLine(0, 0, getWidth(), 0); g.setColor(new Color(221, 221, 221)); g.drawLine(0, 1, getWidth(), 1); }
@Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.setColor(new Color(187, 187, 187)); g.drawLine(0, 0, getWidth(), 0); g.setColor(new Color(221, 221, 221)); g.drawLine(0, 1, getWidth(), 1); }
/** * Implementation detail. * @param g */ @Override protected void paintComponent(Graphics g) { super.paintComponent(g); if(getImage() != null) { Point2D center = new Point2D.Double(getWidth()/2,getHeight()/2); if(getImageLocation() != null) { center = getImageLocation(); } Point2D loc = new Point2D.Double(); double width = getImage().getWidth(null)*getScale(); double height = getImage().getHeight(null)*getScale(); loc.setLocation(center.getX()-width/2, center.getY()-height/2); g.drawImage(getImage(), (int)loc.getX(), (int)loc.getY(), (int)width,(int)height, null); } }
/** * Implementation detail. * @param g */ @Override protected void paintComponent(Graphics g) { super.paintComponent(g); if(getImage() != null) { Point2D center = new Point2D.Double(getWidth()/2,getHeight()/2); if(getImageLocation() != null) { center = getImageLocation(); } Point2D loc = new Point2D.Double(); double width = getImage().getWidth(null)*getScale(); double height = getImage().getHeight(null)*getScale(); loc.setLocation(center.getX()-width/2, center.getY()-height/2); g.drawImage(getImage(), (int)loc.getX(), (int)loc.getY(), (int)width,(int)height, null); } }
/** * Implementation detail. * @param g */ @Override protected void paintComponent(Graphics g) { super.paintComponent(g); if(getImage() != null) { Point2D center = new Point2D.Double(getWidth()/2,getHeight()/2); if(getImageLocation() != null) { center = getImageLocation(); } Point2D loc = new Point2D.Double(); double width = getImage().getWidth(null)*getScale(); double height = getImage().getHeight(null)*getScale(); loc.setLocation(center.getX()-width/2, center.getY()-height/2); g.drawImage(getImage(), (int)loc.getX(), (int)loc.getY(), (int)width,(int)height, null); } }
/** * Implementation detail. * @param g */ @Override protected void paintComponent(Graphics g) { super.paintComponent(g); if(getImage() != null) { Point2D center = new Point2D.Double(getWidth()/2,getHeight()/2); if(getImageLocation() != null) { center = getImageLocation(); } Point2D loc = new Point2D.Double(); double width = getImage().getWidth(null)*getScale(); double height = getImage().getHeight(null)*getScale(); loc.setLocation(center.getX()-width/2, center.getY()-height/2); g.drawImage(getImage(), (int)loc.getX(), (int)loc.getY(), (int)width,(int)height, null); } }
super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; Image img = this.img.get();
super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; Image img = this.img.get();
super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; Image img = this.img.get();
super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; Image img = this.img.get();
super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; Image img = this.img.get();
@Override protected void paintComponent(Graphics g) { super.paintComponent(g);