Java 8 CheckboxGroup - 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 CheckboxGroup class.

This code example shows how to use the following methods:
    public DrawControls(DrawPanel target) {
        this.target = target;
        setLayout(new FlowLayout());
        setBackground(Color.lightGray);
        target.setForeground(Color.red);
        CheckboxGroup group = new CheckboxGroup();
        Checkbox b;
        add(b = new Checkbox(null, group, false));
        b.addItemListener(this);
        b.setForeground(Color.red);
        add(b = new Checkbox(null, group, false));
        b.addItemListener(this);
        b.setForeground(Color.green);
        add(b = new Checkbox(null, group, false));
        b.addItemListener(this);
        b.setForeground(Color.blue);
        add(b = new Checkbox(null, group, false));
        b.addItemListener(this);
        b.setForeground(Color.pink);
        add(b = new Checkbox(null, group, false));
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
       buttonPanel.add( _clearButton = new Button("Clear Screen" ) ) ;
 
       _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 ) ;
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
   private static final long serialVersionUID = -3333694444209526122L;
   private CardLayout _cards;
   private Panel      _cardPanel;
   private Panel      _buttonPanel;
   private CheckboxGroup _checkGroup = new CheckboxGroup() ;
    private Font _font = new Font( "TimesRoman" , 0 , 24 ) ;
    private boolean _useBoxes;
    private int  _b = 14 ;
    @Override 
    public Insets getInsets(){ return new Insets( _b , _b ,_b , _b ) ; }
    @Override 
    public void paint( Graphics g ){
       Dimension d = getSize() ;
       int h = _b / 2 ;
       g.setColor( Color.white ) ;
       int [] xs = new int[4] ;
       int [] ys = new int[4] ;
       xs[0] = h           ; ys[0] = h ;
       xs[1] = d.width-h-1 ; ys[1] = h ;
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 CheckboxGroup Methods: