Examples of revalidate()


Examples of javax.swing.JComponent.revalidate()

      for (int i = menuItems.length - bottomFixedCount; i < menuItems.length; i++) {
        menu.add(menuItems[i]);
      }

      JComponent parent = (JComponent) upItem.getParent();
      parent.revalidate();
      parent.repaint();
    }
  }

  private class MenuScrollListener implements PopupMenuListener {
View Full Code Here

Examples of javax.swing.JComponent.revalidate()

            for (Component item : menuItems) {
                preferredWidth = Math.max(preferredWidth, item.getPreferredSize().width);
            }
            menu.setPreferredSize(new Dimension(preferredWidth, menu.getPreferredSize().height));
            JComponent parent = (JComponent) upItem.getParent();
            parent.revalidate();
            parent.repaint();
        }
    }
   
    private class MouseScrollListener implements MouseWheelListener {
View Full Code Here

Examples of javax.swing.JComponent.revalidate()

      {
        menu.add( menuItems[i] );
      }

      JComponent parent = ( JComponent )upItem.getParent();
      parent.revalidate();
      parent.repaint();
    }
  }

  private class MenuScrollListener implements PopupMenuListener
View Full Code Here

Examples of javax.swing.JDesktopPane.revalidate()

    acts.add(ActionManager.getInstance().getAction(10002));
    acts.add(ActionManager.getInstance().getAction(5));
    wireInputSwitch(acts, pan);
   
    desktopPane.repaint();
    desktopPane.revalidate();
    return pan;
  }
 
  /**
   * Creates a Shortcut panel consisting of 10 slots
View Full Code Here

Examples of javax.swing.JFrame.revalidate()

      frame.setLayout(new BorderLayout());
      frame.setSize(width,height);
      frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
      frame.add(new TransferDisplay(aggregates, transfer), BorderLayout.CENTER);
      frame.setVisible(true);
      frame.revalidate();
      frame.validate();
    }
  }
 
}
View Full Code Here

Examples of javax.swing.JInternalFrame.revalidate()

                JInternalFrame frame = (JInternalFrame) SwingUtilities.getAncestorOfClass(JInternalFrame.class, getUi());
                if (frame != null) {
                    Dimension size = frame.getSize();
                    size.width += 1;
                    frame.setSize(size);
                    frame.revalidate();
                    frame.repaint();
                }
            }
        });
    }
View Full Code Here

Examples of javax.swing.JLabel.revalidate()

        return Utilities.addInsets(size, label.getInsets());
    }

    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) {
View Full Code Here

Examples of javax.swing.JLayeredPane.revalidate()

              _log.debug("\tsetting layered pane size to " + newSize);
            }
            if (newSize.height != layeredPane.getHeight()
                    || newSize.width != layeredPane.getWidth()) {
                layeredPane.setSize(newSize);
                layeredPane.revalidate();
                layeredPane.repaint();
            }
        }
        // size the glass pane
        if (glassPane != null) {
View Full Code Here

Examples of javax.swing.JList.revalidate()

              editor.addPropertyChangedListener(new IPropertyChangedListener() {

                @Override
                public void propertyChanged(Object propertyParent,
                    String propertyName, Object value) {
                  list.revalidate();
                  list.repaint();
                }
              });

              Map<String, IVariableModifier<?>> modifierMap = new HashMap<>();
View Full Code Here

Examples of javax.swing.JMenuBar.revalidate()

        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    });
    bar.revalidate();
    return bar;
  }

  public static void main(String[] args) {
    UIManager.put("TabbedPane.selected", new Color(238, 238, 238));
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.