Package javax.swing

Examples of javax.swing.JComponent.repaint()


  void repaintComponents() {
    for(Iterator it = components.iterator(); it.hasNext(); ) {
      JComponent comp = (JComponent)it.next();
      comp.invalidate();
      comp.repaint();
    }
  }


  public Icon       getLargeIcon() {
View Full Code Here


        menu.add(menuItems[i]);
      }

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

  private class MenuScrollListener implements PopupMenuListener {
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 MouseScrollListener implements MouseWheelListener {
        @Override
View Full Code Here

        menu.add( menuItems[i] );
      }

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

  private class MenuScrollListener implements PopupMenuListener
  {
View Full Code Here

            }
            else if ((border != null) && (border instanceof GridTitledBorder)) {
                // TF:6/9/07:Added the functionality to use the GridTitledBorder for proper behaviour
                GridTitledBorder gridBorder = (GridTitledBorder)border;
                gridBorder.setFrameColor(UIutils.forteToJavaColor(color));
                c.repaint();
            }
            else if ((border != null) && (border instanceof TitledBorder))
            {
                TitledBorder titledBorder = (TitledBorder)border;
                Border innerBorder = titledBorder.getBorder();
View Full Code Here

        // TF:6/9/07:Added functionality to use GridTitledBorder
        if (jc.getBorder() instanceof GridTitledBorder) {
            // Grid Titled Borders know how to adjust themselves properly
            ((GridTitledBorder)jc.getBorder()).setFrameWeight(this.weight);
            jc.revalidate();
            jc.repaint();
        }
        else if (jc instanceof TextGraphic) {
            Border newBorder = null;
            switch (this.weight){
            case Constants.W_DEFAULT:
View Full Code Here

            }
            else if ((border != null) && (border instanceof GridTitledBorder)) {
                // TF:6/9/07:Added the functionality to use the GridTitledBorder for proper behaviour
                GridTitledBorder gridBorder = (GridTitledBorder)border;
                gridBorder.setFrameColor(UIutils.forteToJavaColor(color));
                c.repaint();
            }
            else if ((border != null) && (border instanceof TitledBorder))
            {
                TitledBorder titledBorder = (TitledBorder)border;
                Border innerBorder = titledBorder.getBorder();
View Full Code Here

        // TF:6/9/07:Added functionality to use GridTitledBorder
        if (jc.getBorder() instanceof GridTitledBorder) {
            // Grid Titled Borders know how to adjust themselves properly
            ((GridTitledBorder)jc.getBorder()).setFrameWeight(this.weight);
            jc.revalidate();
            jc.repaint();
        }
        else if (jc instanceof TextGraphic) {
            Border newBorder = null;
            switch (this.weight){
            case Constants.W_DEFAULT:
View Full Code Here

    }

    public void actionPerformed(ActionEvent e) {
      JComponent jc = (JComponent)reference.get();
      if(jc!=null)
        jc.repaint();
    }
  }
}
View Full Code Here

        // TF:6/9/07:Added functionality to use GridTitledBorder
        if (jc.getBorder() instanceof GridTitledBorder) {
            // Grid Titled Borders know how to adjust themselves properly
            ((GridTitledBorder)jc.getBorder()).setFrameWeight(this.weight);
            jc.revalidate();
            jc.repaint();
        }
        else if (jc instanceof TextGraphic) {
            Border newBorder = null;
            switch (this.weight){
            case Constants.W_DEFAULT:
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.