Java 8 Checkbox - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Checkbox class.

This code example shows how to use the following methods:addItemListener, setForeground
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        panel.add(new Checkbox("Three"));
        panel.add(new Checkbox("Four"));
        panel.add(new Checkbox("Five"));
        panel.add(new Checkbox("One"));
        panel.add(new Checkbox("Two"));
        panel.add(new Checkbox("Three"));
        panel.add(new Checkbox("Four"));
        panel.add(new Checkbox("Five"));
 
        frame.add(panel);
        frame.setSize(300, 500);
        frame.setVisible(true);
    } 
 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:addItemListener
      super.add( _cardPanel , "Center" ) ;
   } 
   public void add( Component comp , String name ){
      _cardPanel.add( comp , name ) ;
      if( _useBoxes ){
        Checkbox box = new Checkbox( name , _checkGroup , false ) ;
        box.addItemListener( this ) ;
        _buttonPanel.add( box ) ;
      }else{ 
         Button b = new Button( name ) ;
         b.addActionListener( this ) ;
         _buttonPanel.add( b ) ;
      } 
   } 
   @Override 
   public void itemStateChanged( ItemEvent event ){
      String command = ((Checkbox)event.getSource()).getLabel() ;
      _cards.show( _cardPanel , command ) ;
   } 
   @Override 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
       _optionPanel.add( buttonPanel ) ;
       _optionPanel.add( new Label("Send Command as : " ) ) ;
 
       _checkGroup  = new CheckboxGroup() ;
       _checkString = new Checkbox( "String" , _checkGroup , true ) ;
       _checkArgs   = new Checkbox( "Args" , _checkGroup , false ) ;
       _checkArray  = new Checkbox( "Array" , _checkGroup , false ) ;
 
       Panel checkPanel = new Panel( new GridLayout(1,0) ) ;
       checkPanel.add( _checkString ) ;
       checkPanel.add( _checkArgs ) ;
       checkPanel.add( _checkArray ) ;
 
       _optionPanel.add( checkPanel ) ;
       _backButton.addActionListener( this ) ;
       _clearButton.addActionListener( this ) ;
 
       _input.addActionListener( this ) ;
 
       topPanel.add( _optionPanel ) ;
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:dispatchEvent
    } 
 
    @Override 
    protected void fireItemStateChanged(ItemEvent event) {
        super.fireItemStateChanged(event);
        awtComponent.dispatchEvent(SwingToolkit.convertEvent(event, awtComponent));
        peer.peerSetState(isSelected());
    } 
 
    /** 
     * Pass an event onto the AWT component. 
     * 
     * @see java.awt.Component#processEvent(java.awt.AWTEvent) 
     */ 
    protected final void processEvent(AWTEvent event) {
        awtComponent.dispatchEvent(SwingToolkit.convertEvent(event, awtComponent));
    } 
 
    /** 
     * Process an event within this swingpeer 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getState
		directions = getDirections(WindowManager.getImage(activeImpID));
		rotate(0); 
	} 
 
	private void updateTextbox() { 
		if (deg.getState())
			text.setText(IJ.d2s(this.theta * 180 / Math.PI, 3));
		else 
			text.setText(IJ.d2s(this.theta, 5));
	} 
 
	void addPath(Shape shape, Color color, BasicStroke stroke) {
		Roi roi = new ShapeRoi(shape);
		roi.setStrokeColor(color);
		roi.setStroke(stroke);
		roi.setStrokeWidth(roi.getStrokeWidth() / (float) scale);
		overlay.add(roi);
	} 
 
	void addString(String text, int x, int y, Color color, Font font) {

3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 Checkbox Methods: