Ejemplo n.º 1
0
 private JComponent createToolPanel() {
   JComponent box = Box.createVerticalBox();
   JCheckBox button = new JCheckBox(disablingItem.getText());
   button.setModel(disablingItem.getModel());
   box.add(Box.createGlue());
   box.add(button);
   box.add(Box.createGlue());
   JRadioButton blur = new JRadioButton(blurItem.getText());
   blur.setModel(blurItem.getModel());
   box.add(blur);
   JRadioButton emboss = new JRadioButton(embossItem.getText());
   emboss.setModel(embossItem.getModel());
   box.add(emboss);
   JRadioButton translucent = new JRadioButton(busyPainterItem.getText());
   translucent.setModel(busyPainterItem.getModel());
   box.add(translucent);
   box.add(Box.createGlue());
   return box;
 }
Ejemplo n.º 2
0
 private JComponent createLayerPanel() {
   JComponent panel = new JPanel();
   panel.add(new JCheckBox("JCheckBox"));
   panel.add(new JRadioButton("JRadioButton"));
   panel.add(new JTextField(15));
   JButton button = new JButton("Have a nice day");
   button.setMnemonic('H');
   button.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent e) {
           logger.info("LockableLayerDemo.actionPerformed");
         }
       });
   panel.add(button);
   panel.add(new JTextField(15));
   panel.add(new JCheckBox("JCheckBox"));
   panel.add(new JRadioButton("JRadioButton"));
   panel.add(new JTextField(15));
   panel.add(new JCheckBox("JCheckBox"));
   panel.add(new JRadioButton("JRadioButton"));
   panel.setBorder(BorderFactory.createEtchedBorder());
   return panel;
 }