Package javax.swing

Examples of javax.swing.JPanel.repaint()


    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();

  }

  private JLabel getPieceJPanel(Piece p) {
View Full Code Here


    };

    Observer observer;
    this.addObserver(observer = new Observer() {
      public void update(Observable obs, Object obj) {
        panel.repaint();
      }
    });

    // Saving observer reference for releaseInterfaceVisualizer
    panel.putClientProperty("intf_obs", observer);
View Full Code Here

        final JPanel myself = this;
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                data.setValue((Number) r.getValue());
                myself.revalidate();
                myself.repaint();
            }
        });
    }

    public static Types.Type[] getSupportedTypes() {
View Full Code Here

        } else {
          multiSelection.add(fpane = ns, BorderLayout.CENTER);
        }

        multiSelection.revalidate();
        multiSelection.repaint();
      }
    });

    list.setCellRenderer(new ListCellRenderer() {
      private final JCheckBox cb = new JCheckBox();
View Full Code Here

                        for (ZooInspectorNodeViewer viewer : nodeViewers) {
                            model.addElement(viewer);
                        }
                        viewersList.setModel(model);
                        panel.revalidate();
                        panel.repaint();
                    } catch (Exception ex) {
                        LoggerFactory
                                .getLogger()
                                .error(
                                        "Error loading node viewer configuration from file.",
View Full Code Here

                              }
                              JSyntaxHighlighter syntaxHighlighter = new JSyntaxHighlighter();
                              syntaxHighlighter.setContent(sb.toString(), ContentLanguage.Java);
                              sourcePanel.add(syntaxHighlighter, BorderLayout.CENTER);
                              sourcePanel.revalidate();
                              sourcePanel.repaint();
                              reader.close();
                            } catch(Exception ex) {
                              ex.printStackTrace();
                            }
                          }
View Full Code Here

        parameters.setPostData(postDataMap);
        // Let's generate the page with the resulting HTTP headers dynamically.
        webBrowser.navigate(WebServer.getDefaultWebServer().getDynamicContentURL(NavigationParameters.class.getName(), "header-viewer.html"), parameters);
        webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
        webBrowserPanel.revalidate();
        webBrowserPanel.repaint();
      }
    });
    return contentPane;
  }
View Full Code Here

          contentPane.remove(flashPlayer);
        } else {
          contentPane.add(flashPlayer, BorderLayout.CENTER);
        }
        contentPane.revalidate();
        contentPane.repaint();
        isAdded = !isAdded;
      }
    });
    JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 10));
    buttonPanel.add(addRemoveButton);
View Full Code Here

    };

    Observer observer;
    this.addObserver(observer = new Observer() {
      public void update(Observable obs, Object obj) {
        panel.repaint();
      }
    });

    // Saving observer reference for releaseInterfaceVisualizer
    panel.putClientProperty("intf_obs", observer);
View Full Code Here

    };

    Observer observer;
    this.addObserver(observer = new Observer() {
      public void update(Observable obs, Object obj) {
        panel.repaint();
      }
    });

    // Saving observer reference for releaseInterfaceVisualizer
    panel.putClientProperty("intf_obs", observer);
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.