Java Code Examples for javax.swing.JButton.addActionListener()

The following are Jave code examples for showing how to use addActionListener() of the javax.swing.JButton class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: openvisualtraceroute   File: RouteTablePanel.java   View Source Code Vote up 6 votes
@Override
public Component getTableCellEditorComponent(final JTable table, final Object value, final boolean isSelected, final int row, final int column) {
	final Component c = super.getTableCellEditorComponent(table, value, isSelected, row, column);
	final JButton button = new JButton("?");
	button.setMargin(new Insets(0, 0, 0, 0));
	button.setToolTipText(Column.WHO_IS.getLabel());
	button.setPreferredSize(new Dimension(Column.WHO_IS.getWidth(), c.getHeight()));
	button.setMaximumSize(button.getPreferredSize());
	if (Env.INSTANCE.getOs() == OS.win) {
		button.setBorder(null);
	}
	button.setEnabled(!_searching);
	button.addActionListener(e -> {
		final RoutePoint point = _route.getRoute().get(_table.convertRowIndexToModel(row));
		WhoIsPanel.showWhoIsDialog(RouteTablePanel.this, _services, point);
		if (table.isEditing()) {
			table.getCellEditor().stopCellEditing();
		}
		_whois.clear();
	});
	return button;
}
 
Example 2
Project: zencash-swing-wallet-ui   File: AddressBookPanel.java   View Source Code Vote up 6 votes
private JPanel buildButtonsPanel() {
    JPanel panel = new JPanel();
    panel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
    panel.setLayout(new FlowLayout(FlowLayout.CENTER, 3, 3));
    
    JButton newContactButton = new JButton("New contact...");
    newContactButton.addActionListener(new NewContactActionListener());
    panel.add(newContactButton);
            
    sendCashButton = new JButton("Send ZEN");
    sendCashButton.addActionListener(new SendCashActionListener());
    sendCashButton.setEnabled(false);
    panel.add(sendCashButton);
    
    copyToClipboardButton = new JButton("Copy address to clipboard");
    copyToClipboardButton.setEnabled(false);
    copyToClipboardButton.addActionListener(new CopyToClipboardActionListener());
    panel.add(copyToClipboardButton);
    
    deleteContactButton = new JButton("Delete contact");
    deleteContactButton.setEnabled(false);
    deleteContactButton.addActionListener(new DeleteAddressActionListener());
    panel.add(deleteContactButton);
    
    return panel;
}
 
Example 3
Project: incubator-netbeans   File: TestStringWizardPanel.java   View Source Code Vote up 6 votes
/** Constructor. */
public CustomizeCellEditor() {
    editorComponent = new JButton("..."); // NOI18N
    
    editorComponent.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            PropertyPanel panel = i18nString.getSupport().getPropertyPanel();
            panel.setI18nString(i18nString);

            DialogDescriptor dd = new DialogDescriptor(panel,"Customize Property");
            dd.setModal(true);
            dd.setOptionType(DialogDescriptor.DEFAULT_OPTION);
            dd.setOptions(new Object[] {DialogDescriptor.OK_OPTION});
            dd.setAdditionalOptions(new Object[0]);
            dd.setButtonListener(CustomizeCellEditor.this);

            Dialog dialog = DialogDisplayer.getDefault().createDialog(dd);
            dialog.setVisible(true);
        }
    });
}
 
Example 4
Project: AgentWorkbench   File: DynTableCellRenderEditor.java   View Source Code Vote up 6 votes
/**
 * Returns the JButton for a OntologyClassVisualsation like for TimeSeries or XyChart's.
 *
 * @param dynType the current DynType
 * @param startArgIndex the start argument index
 * @return the JButton for special class
 */
private JButton getJButtonOntologyClassVisualsation(DynType dynType) {
	
	final DynType dynTypeCurrent = dynType;
	 
	JButton jButtonSpecialClass = new JButton();
	jButtonSpecialClass.setFont(new Font("Arial", Font.BOLD, 11));
	jButtonSpecialClass.setText("Edit");
	jButtonSpecialClass.addActionListener(new ActionListener() {
		@Override
		public void actionPerformed(ActionEvent e) {
			dynTable.setOntologyClassVisualsationVisible(dynTypeCurrent);
		}
	});
	return jButtonSpecialClass;
}
 
Example 5
Project: smile_1.5.0_java7   File: ApproximateStringSearchDemo.java   View Source Code Vote up 6 votes
public ApproximateStringSearchDemo() {
    super(new BorderLayout());

    startButton = new JButton("Start");
    startButton.setActionCommand("startButton");
    startButton.addActionListener(this);

    knnField = new JTextField(Integer.toString(knn), 5);

    optionPane = new JPanel(new FlowLayout(FlowLayout.LEFT));
    optionPane.setBorder(BorderFactory.createRaisedBevelBorder());
    optionPane.add(startButton);
    optionPane.add(new JLabel("K:"));
    optionPane.add(knnField);

    add(optionPane, BorderLayout.NORTH);

    canvas = new JPanel(new GridLayout(1, 2));
    canvas.setBackground(Color.WHITE);
    add(canvas, BorderLayout.CENTER);
}
 
Example 6
Project: incubator-netbeans   File: SideBarFactoryImpl.java   View Source Code Vote up 6 votes
public SideBar(Document forDocument) {
    super(new BorderLayout());
    this.forDocument = forDocument;
    add(new BreadCrumbComponent(), BorderLayout.CENTER);

    JButton closeButton = CloseButtonFactory.createBigCloseButton();

    add(closeButton, BorderLayout.EAST);
    
    prefs = MimeLookup.getLookup(MimePath.EMPTY).lookup(Preferences.class);
    prefs.addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, this, prefs));
    
    closeButton.addActionListener(new ActionListener() {
        @Override public void actionPerformed(ActionEvent e) {
            prefs.putBoolean(KEY_BREADCRUMBS, false);
        }
    });
    
    setBorder(new SeparatorBorder());
    preferenceChange(null);
}
 
Example 7
Project: https-github.com-apache-zookeeper   File: NodeViewerData.java   View Source Code Vote up 5 votes
public NodeViewerData() {
    this.setLayout(new BorderLayout());
    this.dataArea = new JTextPane();
    this.toolbar = new JToolBar();
    this.toolbar.setFloatable(false);
    JScrollPane scroller = new JScrollPane(this.dataArea);
    scroller
            .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    this.add(scroller, BorderLayout.CENTER);
    this.add(this.toolbar, BorderLayout.NORTH);
    JButton saveButton = new JButton(ZooInspector.iconResource.get(IconResource.ICON_SAVE,""));
    saveButton.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            if (selectedNode != null) {
                if (JOptionPane.showConfirmDialog(NodeViewerData.this,
                        "Are you sure you want to save this node?"
                                + " (this action cannot be reverted)",
                        "Confirm Save", JOptionPane.YES_NO_OPTION,
                        JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
                    zooInspectorManager.setData(selectedNode, dataArea
                            .getText());
                }
            }
        }
    });
    this.toolbar.add(saveButton);

}
 
Example 8
Project: Equella   File: StepDialog.java   View Source Code Vote up 5 votes
private void setup()
{
	JLabel label = new JLabel(CurrentLocale.get("com.tle.admin.workflow.stepdialog.title"));

	model = new GenericListModel<Class<? extends WorkflowNode>>();
	list = new JList(model);
	list.setCellRenderer(new WorkflowCellRenderer());
	list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	list.addListSelectionListener(this);
	list.addMouseListener(this);

	ok = new JButton(CurrentLocale.get("com.tle.admin.ok"));
	cancel = new JButton(CurrentLocale.get("com.tle.admin.cancel"));

	ok.addActionListener(this);
	cancel.addActionListener(this);

	final int height1 = label.getPreferredSize().height;
	final int height2 = ok.getPreferredSize().height;
	final int width1 = cancel.getPreferredSize().width;

	final int[] rows = {height1, TableLayout.FILL, height2,};
	final int[] cols = {TableLayout.FILL, width1, width1,};

	content = new JPanel(new TableLayout(rows, cols));
	content.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

	content.add(label, new Rectangle(0, 0, 3, 1));
	content.add(new JScrollPane(list), new Rectangle(0, 1, 3, 1));
	content.add(ok, new Rectangle(1, 2, 1, 1));
	content.add(cancel, new Rectangle(2, 2, 1, 1));

	updateButtons();
}
 
Example 9
Project: scorekeeperfrontend   File: EntryPanel.java   View Source Code Vote up 5 votes
private JButton smallButton(String text, boolean enabled)
{
    JButton b = new JButton(text);
    b.setEnabled(enabled);
    b.addActionListener(this);
    return b;
}
 
Example 10
Project: incubator-netbeans   File: ButtonFactory.java   View Source Code Vote up 5 votes
/**
 * Creates button to maximize currently selected document in the given tab displayer.
 * @param controller Tab displayer's controller.
 * @return Button to maximize selected document tab.
 */
public static JButton createMaximizeButton( final Controller controller ) {
    final JButton btn = new JButton();
    btn.setIcon( ImageUtilities.loadImageIcon( "org/netbeans/core/multitabs/resources/maximize.png", true) ); //NOI18N
    btn.setToolTipText( NbBundle.getMessage(ButtonFactory.class, "Hint_MaximizeRestore") );
    btn.addActionListener( new ActionListener() {

        @Override
        public void actionPerformed( ActionEvent e ) {
            controller.postActionEvent( new TabActionEvent( btn, TabbedContainer.COMMAND_MAXIMIZE, -1 ) );
        }
    });
    btn.setFocusable( false );
    return btn;
}
 
Example 11
Project: code-sentinel   File: JasonID.java   View Source Code Vote up 5 votes
protected JButton createToolBarButton(String toolTip, Icon icon, ActionListener act) {
    JButton button = new RolloverButton(icon);
    button.setMargin(new Insets(0, 0, 0, 0));
    button.setRequestFocusEnabled(false);
    button.setToolTipText(toolTip);
    button.setRequestFocusEnabled(false);
    button.addActionListener(act);
    return button;
}
 
Example 12
Project: ArJ-class-editor   File: ArJClassEditor.java   View Source Code Vote up 5 votes
/**
 * Constructs a compile button according to parameters
 * @param compileButtonText the text of the compile button
 * @return the constructed button
 */
public JButton createCompileButton(String compileButtonText)
{
	JButton compileButton = new JButton(compileButtonText);
	ActionListener compileButtonListener = new ActionListener()
	{
		@Override
		public void actionPerformed(ActionEvent e) 
		{
			try 
			{
				compile();
			} 
			catch (IOException e1) 
			{
				source.getParentFile().mkdirs();
				compiler.run(null, null, null, source.getPath());
				try
				{
					loadClass();
				}
				catch(MalformedURLException e2) {}
			}
		}
	};
	compileButton.addActionListener(compileButtonListener);
	return compileButton;
}
 
Example 13
Project: smile_1.5.0_java7   File: FontCellEditor.java   View Source Code Vote up 5 votes
/**
 * Constructor.
 */
public FontCellEditor() {
    button = new JButton("AaBbYyZz");
    button.setActionCommand(EDIT);
    button.addActionListener(this);

    // Set up the dialog that the button brings up.
    fontChooser = new FontChooser();
}
 
Example 14
Project: openjdk-jdk10   File: ImageableAreaTest.java   View Source Code Vote up 5 votes
private static void createAndShowTestDialog(String description,
        String failMessage, Runnable action) {
    final JDialog dialog = new JDialog();
    dialog.setTitle("Test: " + (++testCount));
    dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
    JTextArea textArea = new JTextArea(description);
    textArea.setEditable(false);
    final JButton testButton = new JButton("Print Table");
    final JButton passButton = new JButton("PASS");
    passButton.setEnabled(false);
    passButton.addActionListener((e) -> {
        dialog.dispose();
    });
    final JButton failButton = new JButton("FAIL");
    failButton.setEnabled(false);
    failButton.addActionListener((e) -> {
        throw new RuntimeException(failMessage);
    });
    testButton.addActionListener((e) -> {
        testButton.setEnabled(false);
        action.run();
        passButton.setEnabled(true);
        failButton.setEnabled(true);
    });
    JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.add(textArea, BorderLayout.CENTER);
    JPanel buttonPanel = new JPanel(new FlowLayout());
    buttonPanel.add(testButton);
    buttonPanel.add(passButton);
    buttonPanel.add(failButton);
    mainPanel.add(buttonPanel, BorderLayout.SOUTH);
    dialog.add(mainPanel);
    dialog.pack();
    dialog.setVisible(true);
}
 
Example 15
Project: paillier   File: GUI.java   View Source Code Vote up 5 votes
public Controls() {
	setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
	setBorder(new EmptyBorder(1, 1, 1, 1));
	setBackground(Color.blue);

	JPanel t = new JPanel();
	t.setBorder(new EmptyBorder(5, 5, 5, 5));
	label = new JLabel();
	label.setLayout(new BorderLayout());
	t.add(label);
	t.setSize(1185, 50);
	add(t);
	JPanel p = new JPanel();
	start = new JButton("Start");
	start.addActionListener(this);
	p.add(start);
	processVoting = new JButton("ProcessVoting");
	processVoting.addActionListener(this);
	p.add(processVoting);
	add(p);

	textArea = new JPanel();
	screen = new JTextArea(17, 100);
	screen.setLineWrap(true);
	screen.setForeground(Color.blue);// set color for font
	screen.setBackground(Color.WHITE);// set background color
	// screen.setText("\n" + "Results from encryption and decryption");
	JScrollPane scrollingArea = new JScrollPane(screen);
	scrollingArea.setSize(15, 100);
	textArea.add(scrollingArea, BorderLayout.CENTER);
	add(textArea);

}
 
Example 16
Project: incubator-netbeans   File: RSSFeed.java   View Source Code Vote up 5 votes
private JComponent buildProxyPanel() {
    Component header = getContentHeader();
    JPanel panel = new JPanel(new GridBagLayout());
    panel.setOpaque( false );

    int row = 0;
    if( null != header ) {
        panel.add( header,  new GridBagConstraints(0,row++,1,1,1.0,0.0,
                GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,0,0),0,0 ) );
    }

    panel.add( new JLabel(BundleSupport.getLabel("ErrCannotConnect")),  // NOI18N
            new GridBagConstraints(0,row++,1,1,0.0,0.0,
            GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(5,10,10,5),0,0 ) );
    if( showProxyButton ) {
        JButton button = new JButton();
        Mnemonics.setLocalizedText( button, BundleSupport.getLabel( "ProxyConfig" ) );  // NOI18N
        button.setOpaque( false );
        button.addActionListener( new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                HttpProxySettings.getDefault().showConfigurationDialog();
            }
        });
        panel.add( button, new GridBagConstraints(0,row++,1,1,0.0,0.0,
                GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(5,10,10,5),0,0 ) );
    }
    return panel;
}
 
Example 17
Project: OverTale   File: DrowLine.java   View Source Code Vote up 4 votes
public void init() {


		butt = new JButton("확인");
		butt.addActionListener(this);

		tf = new JTextField(20);
		tf.addKeyListener(this);

		JPanel base = new JPanel();
		base.setLayout(new BorderLayout());
		JPanel p1 = new JPanel();
		p1.setLayout(new BorderLayout());
		JMenuBar menu = new JMenuBar();
		JMenu file = new JMenu("파일");
		JMenu draw = new JMenu("그리기");
		JMenu color = new JMenu("색상");

		JMenuItem menu1 = new JMenuItem("새그림");
		JMenuItem menu2 = new JMenuItem("열기");
		JMenuItem menu3 = new JMenuItem("저장");
		JMenuItem menu4 = new JMenuItem("종료");
		JMenuItem menu5 = new JMenuItem("사각형");
		JMenuItem menu6 = new JMenuItem("타원");
		JMenuItem menu7 = new JMenuItem("둥근사각형");
		JMenuItem menu8 = new JMenuItem("직선");
		JMenuItem menu9 = new JMenuItem("윤각선");
		JMenuItem menu10 = new JMenuItem("채우기");

		menu1.addActionListener(this);
		menu2.addActionListener(this);
		menu3.addActionListener(this);
		menu4.addActionListener(this);
		menu5.addActionListener(this);
		menu6.addActionListener(this);
		menu7.addActionListener(this);
		menu8.addActionListener(this);
		menu9.addActionListener(this);
		menu10.addActionListener(this);


		menu.add(file);
		file.add(menu1);
		file.add(menu2);
		file.add(menu3);
		file.add(menu4);

		menu.add(draw);
		draw.add(menu5);
		draw.add(menu6);
		draw.add(menu7);
		draw.add(menu8);

		menu.add(color);
		color.add(menu9);
		color.add(menu10);

		p1.add("Center", menu);
		p1.add("East", tf);

		base.add("North", p1);

		panel.add(imageLabel);
		add("North", base);
		add("Center", panel);
		add("South",butt);
		butt.setVisible(false);

	}
 
Example 18
Project: ramus   File: SizeChangedDialog.java   View Source Code Vote up 4 votes
/**
 * Create the dialog.
 */
public SizeChangedDialog(JDialog jDialog) {
    super(jDialog, true);
    setTitle(ResourceLoader.getString("resize_dialog_title"));
    setBounds(100, 100, 450, 300);
    getContentPane().setLayout(new BorderLayout());
    contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    getContentPane().add(contentPanel, BorderLayout.CENTER);
    GridBagLayout gbl_contentPanel = new GridBagLayout();
    gbl_contentPanel.columnWidths = new int[]{0, 0};
    gbl_contentPanel.rowHeights = new int[]{0, 0, 0};
    gbl_contentPanel.columnWeights = new double[]{0.0, Double.MIN_VALUE};
    gbl_contentPanel.rowWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
    contentPanel.setLayout(gbl_contentPanel);
    {
        updateZoom = new JCheckBox(ResourceLoader.getString("Update_zoom"));
        updateZoom.setSelected(true);
        updateZoom.setEnabled(false);
        GridBagConstraints gbc_updateZoom = new GridBagConstraints();
        gbc_updateZoom.anchor = GridBagConstraints.WEST;
        gbc_updateZoom.insets = new Insets(0, 0, 5, 0);
        gbc_updateZoom.gridx = 0;
        gbc_updateZoom.gridy = 0;
        contentPanel.add(updateZoom, gbc_updateZoom);
    }
    {
        updateFonts = new JCheckBox(ResourceLoader.getString("Update_fonts"));
        updateFonts.setSelected(true);
        GridBagConstraints gbc_updateFonts = new GridBagConstraints();
        gbc_updateFonts.anchor = GridBagConstraints.WEST;
        gbc_updateFonts.gridx = 0;
        gbc_updateFonts.gridy = 1;
        contentPanel.add(updateFonts, gbc_updateFonts);
    }
    {
        JPanel buttonPane = new JPanel();
        buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
        getContentPane().add(buttonPane, BorderLayout.SOUTH);
        {
            JButton okButton = new JButton(ResourceLoader.getString("ok"));
            okButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent arg0) {
                    setVisible(false);
                }
            });
            okButton.setActionCommand("OK");
            buttonPane.add(okButton);
            getRootPane().setDefaultButton(okButton);
        }
    }
}
 
Example 19
Project: online-examination-system   File: OnlineTest.java   View Source Code Vote up 4 votes
public void actionPerformed(ActionEvent e)
	{
		if(e.getSource()==b1)
		{
			if(check())
				count=count+1;
			current++;
			set();	
			if(current==9)
			{
				b1.setEnabled(false);
				b2.setText("Result");
			}
		}
		if(e.getActionCommand().equals("Bookmark"))
		{
			JButton bk=new JButton("Bookmark"+x);
			bk.setBounds(480,20+30*x,100,30);
			add(bk);
			bk.addActionListener(this);
			m[x]=current;
			x++;
			current++;
			set();	
			if(current==9)
				b2.setText("Result");
			setVisible(false);
			setVisible(true);
		}
		for(int i=0,y=1;i<x;i++,y++)
		{
		if(e.getActionCommand().equals("Bookmark"+y))
		{
			if(check())
				count=count+1;
			now=current;
			current=m[y];
			set();
			((JButton)e.getSource()).setEnabled(false);
			current=now;
		}
		}
	        wrong = 10-count;
                marks = (count*4);
                acc = count*100/10;
		if(e.getActionCommand().equals("Result"))
		{
			if(check())
				count=count+1;
			current++;
	         //System.out.println("correct ans="+count);
JOptionPane.showMessageDialog(this," Correct Answer = "+count+"\n Incorrect Answer = "+wrong
+" \n Marks = "+marks+"\n Accuracy(%) = "+acc+"%");
             

   
     try{
      Class.forName("com.mysql.jdbc.Driver");
      Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/ooad","root",null);
      System.out.println("connected");
    String Query = "insert into regform values('"+marks+"','"+acc+"')";
            //+  where username='"+username+"',passwd='"+password+"'";
    Statement st = con.createStatement();
    st.executeUpdate(Query);
   
     new MENUBAR().setVisible(true);  
    
     }
     catch(Exception e1)
     {
       System.err.println(e1);        
     }


                /*JOptionPane.showMessageDialog(this," Incorrect Answer = "+wrong);
                JOptionPane.showMessageDialog(this," Marks = "+marks);
                JOptionPane.showMessageDialog(this," Accuracy(%) = "+acc+"%");*/
               new MENUBAR().setVisible(true);  
	        //System.exit(0);
		}
	}
 
Example 20
Project: parabuild-ci   File: DefaultColorBarEditor.java   View Source Code Vote up 4 votes
/**
 * Creates a new edit panel for a color bar.
 * 
 * @param colorBar  the color bar.
 */
public DefaultColorBarEditor(ColorBar colorBar) {
    super((NumberAxis) colorBar.getAxis());
    this.invertPalette = colorBar.getColorPalette().isInverse(); 
    this.stepPalette = colorBar.getColorPalette().isStepped(); 
    this.currentPalette = new PaletteSample(colorBar.getColorPalette());
    this.availablePaletteSamples = new PaletteSample[2];
    this.availablePaletteSamples[0] 
        = new PaletteSample(new RainbowPalette());
    this.availablePaletteSamples[1] 
        = new PaletteSample(new GreyPalette());

    JTabbedPane other = getOtherTabs();

    JPanel palettePanel = new JPanel(new LCBLayout(4));
    palettePanel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    palettePanel.add(new JPanel());
    this.invertPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Invert_Palette"), 
        this.invertPalette
    );
    this.invertPaletteCheckBox.setActionCommand("invertPalette");
    this.invertPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.invertPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(new JPanel());
    this.stepPaletteCheckBox = new JCheckBox(
        localizationResources.getString("Step_Palette"),
        this.stepPalette
    );
    this.stepPaletteCheckBox.setActionCommand("stepPalette");
    this.stepPaletteCheckBox.addActionListener(this);
    palettePanel.add(this.stepPaletteCheckBox);
    palettePanel.add(new JPanel());

    palettePanel.add(
        new JLabel(localizationResources.getString("Palette"))
    );
    JButton button 
        = new JButton(localizationResources.getString("Set_palette..."));
    button.setActionCommand("PaletteChoice");
    button.addActionListener(this);
    palettePanel.add(this.currentPalette);
    palettePanel.add(button);

    other.add(localizationResources.getString("Palette"), palettePanel);

}