Package javax.swing

Examples of javax.swing.JLabel.repaint()


    }

    public void propertyChange(final PropertyChangeEvent e) {
        JLabel label = (JLabel)e.getSource();
        label.revalidate();
        label.repaint();
    }


    protected String layoutCL(final JLabel label, final FontMetrics fontMetrics, final String text, final Icon icon, final Rectangle viewR, final Rectangle iconR, final Rectangle textR) {
        return SwingUtilities.layoutCompoundLabel(label, fontMetrics, text, icon, label.getVerticalAlignment(), label.getHorizontalAlignment(), label.getVerticalTextPosition(), label.getHorizontalTextPosition(), viewR, iconR, textR, label.getIconTextGap());
View Full Code Here


    void setColor(MatrixPoint p, int rgb) {
        int pos = cx * p.y + p.x;
        JLabel l = labels[pos];
        l.setOpaque(true);
        l.setBackground(new Color(rgb));
        l.repaint();
    }

    int getColor(MatrixPoint p) {
        int pos = cx * p.y + p.x;
        JLabel l = labels[pos];
View Full Code Here

                            break;
                        } catch (Exception ignored) {
                        }
                    }
                }
                canvas.repaint();
                timer.stop();
            }
        });

        config.addPropertyChangeListener("albumart.nowPlayingOnly", true, new PropertyChangeListener() {
View Full Code Here

    System.out.println("add");
    JPanel panel = (JPanel) chessBoard
        .getComponent((cote == Couleur.NOIR ? y : 7 - y) * 8 + x);
    JLabel piece = getPieceJPanel(p);
    panel.add(piece);
    piece.repaint();
    panel.repaint();
    this.repaint();

  }

View Full Code Here

      }
      @Override
      public void mouseDragged(MouseEvent e) {
        Point newMouseLocation = SwingUtilities.convertPoint(imageLabel, e.getPoint(), imageLabel.getParent());
        imageLabel.setLocation(originalLocation.x - originalMouseLocation.x + newMouseLocation.x, originalLocation.y - originalMouseLocation.y + newMouseLocation.y);
        imageLabel.repaint();
      }
    };
    imageLabel.addMouseMotionListener(mouseInputAdapter);
    imageLabel.addMouseListener(mouseInputAdapter);
    imageLabel.setSize(imageLabel.getPreferredSize());
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.