Examples of paint()


Examples of java.awt.Frame.paint()

                externalFrame.setSize(200, 200);
            }
           
            Graphics g = externalFrame.getGraphics();
            g.clearRect(0, 0, 200, 200);
            externalFrame.paint(g);
            g.translate(externalFrame.getInsets().left, externalFrame.getInsets().top);
            ((Graphics2D)g).setTransform(((Graphics2D)originalGraphics).getTransform());
           
            g.setColor(originalGraphics.getColor());                       
           
View Full Code Here

Examples of java.awt.peer.ComponentPeer.paint()

     */
    protected void updateComponent(Component comp, Graphics g) {
        if (comp != null) {
            ComponentPeer peer = comp.getPeer();
            if (peer != null) {
                peer.paint(g);
            }
            super.updateComponent(comp, g);
        }
    }

View Full Code Here

Examples of javax.swing.JComponent.paint()

                                // Composite for
                                // the
                                // Graphics2D
                                // context
          lbl.setOpaque(false);
          lbl.paint(graphics); // painting the graphics to label
          graphics.dispose();
        }
        dragSource.startDrag(dge, DragSource.DefaultMoveNoDrop, image,
            new Point(0, 0), new TransferableNode(draggedNode),
            this);
View Full Code Here

Examples of javax.swing.JInternalFrame.paint()

    final BufferedImage image = new BufferedImage(window.getWidth(), window.getHeight(), BufferedImage.TYPE_INT_ARGB);

    SwingUtilities.invokeAndWait(new Runnable() {
      public void run() {
        Graphics2D g = image.createGraphics();
        window.paint(g);
        g.dispose();
      }
    });
   
    return image;
View Full Code Here

Examples of javax.swing.JLabel.paint()

        // Get a graphics context for this image
        Graphics2D g2 = mGhostImage.createGraphics();

        // Ask the cell renderer to paint itself into the BufferedImage
        lbl2.paint(g2);

        // Use DST_OVER to cause under-painting to occur
        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_OVER,
            0.5f));
View Full Code Here

Examples of javax.swing.JPanel.paint()

 
  public FotoTest() throws Exception {
    uploadFoto();
    downloadFoto();
    JPanel p1 = new JPanel();
    p1.paint(getGraphics());
    add(p1, BorderLayout.CENTER);
    pack();
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
  }
View Full Code Here

Examples of javax.swing.JProgressBar.paint()

    b1.paint(g);
    g.translate(-dx,-dy);
    dx = image.getWidth()-b2.getWidth();
    dy = image.getHeight()/2-b2.getHeight()/2;
    g.translate(dx,dy);
    b2.paint(g);
    g.dispose();
    return image;
  }
 
  public static void main(String[] args) {
View Full Code Here

Examples of javax.swing.JRadioButton.paint()

    g2.setColor(Color.darkGray);
    bt.paint(g2);
    g2.setColor(Color.blue);
    g2.setTransform(AffineTransform.getTranslateInstance(20, 20));
    radio.paint(g2);
    g2.setTransform(AffineTransform.getTranslateInstance(0, 0));
    g2.setPaint(Color.green);
    g2.setFont(new Font("Serif", Font.PLAIN, 10));
    g2.drawString("You are viewing a graphics of JFreeReport on index "
        + event.getState().getCurrentDataItem(), 10, 10);
View Full Code Here

Examples of javax.swing.JTextArea.paint()

    //Text
    SVGGraphics2D svgGenerator2 = (SVGGraphics2D) g2d.create(x, y, width, height);

    //svgGenerator2.create(x, y, width, height);
    //svgGenerator2.draw(.dra)
    n.paint( svgGenerator2 );
   
  }
 

  public void drawArrow(SVGGraphics2D g2d,
View Full Code Here

Examples of javax.swing.Painter.paint()

    @Override protected void paintComponent(Graphics g) {
        Painter painter = (Painter) UIManager.get(
            "TableHeader:\"TableHeader.renderer\"[Enabled].backgroundPainter");
        if (painter != null){
            if (g instanceof Graphics2D){
                painter.paint((Graphics2D)g,this,getWidth()+1,getHeight());
            } else {
                // paint using image to not Graphics2D to support
                // Java 1.1 printing API
                BufferedImage img =  new BufferedImage(getWidth(),getHeight(),
                        BufferedImage.TYPE_INT_ARGB);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.