Package javax.swing

Examples of javax.swing.JComponent.revalidate()


            @Override
            public void mouseReleased(MouseEvent e) {
                if (resizing) {
                    JComponent parent = (JComponent) e.getComponent().getParent();
                    parent.revalidate();
                    parent.repaint();
                }
                resizing = false;
                dragging = false;
                e.getComponent().setCursor(savedCursor);
View Full Code Here


                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 MenuScrollListener implements PopupMenuListener {
View Full Code Here

            ((Hashtable<?, ?>)getComponentToLayerMethod.invoke(oldParent)).remove(embeddedPanel);
          } catch(Throwable e) {
            // If it does not work, remain silent as it may not be a problem depending on the VM
          }
        }
        oldParent.revalidate();
        oldParent.repaint();
      }
      revalidate();
      repaint();
      embeddedPanel.setVisible(true);
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.