Refine search
titlePanel.add(upButton); upButton.setText("Up"); upButton.setMargin(new Insets(0, 0, 0, 0)); Font font = upButton.getFont(); upButton.setFont(new Font(font.getName(), font.getStyle(), font.getSize() - 2)); titlePanel.add(downButton); downButton.setText("Down"); downButton.setMargin(new Insets(0, 0, 0, 0)); Font font = downButton.getFont(); downButton.setFont(new Font(font.getName(), font.getStyle(), font.getSize() - 2)); titlePanel.add(deleteButton); deleteButton.setText("X"); deleteButton.setMargin(new Insets(0, 0, 0, 0)); Font font = deleteButton.getFont(); deleteButton.setFont(new Font(font.getName(), font.getStyle(), font.getSize() - 2));
titlePanel.add(upButton); upButton.setText("Up"); upButton.setMargin(new Insets(0, 0, 0, 0)); Font font = upButton.getFont(); upButton.setFont(new Font(font.getName(), font.getStyle(), font.getSize() - 2)); titlePanel.add(downButton); downButton.setText("Down"); downButton.setMargin(new Insets(0, 0, 0, 0)); Font font = downButton.getFont(); downButton.setFont(new Font(font.getName(), font.getStyle(), font.getSize() - 2)); titlePanel.add(deleteButton); deleteButton.setText("X"); deleteButton.setMargin(new Insets(0, 0, 0, 0)); Font font = deleteButton.getFont(); deleteButton.setFont(new Font(font.getName(), font.getStyle(), font.getSize() - 2));
leftSidePanel.setLayout(new GridBagLayout()); getContentPane().add(leftSidePanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); fontPanel.setLayout(new GridBagLayout()); fontPanel.setBorder(BorderFactory.createTitledBorder("Font")); fontPanel.add(browseButton, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); browseButton.setMargin(new Insets(0, 0, 0, 0));
leftSidePanel.setLayout(new GridBagLayout()); getContentPane().add(leftSidePanel, new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); fontPanel.setLayout(new GridBagLayout()); fontPanel.setBorder(BorderFactory.createTitledBorder("Font")); fontPanel.add(browseButton, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); browseButton.setMargin(new Insets(0, 0, 0, 0));
JButton button = new JButton(); button.setBorderPainted(false); button.setBorder(null); //button.setFocusable(false); button.setMargin(new Insets(0, 0, 0, 0)); button.setContentAreaFilled(false); button.setIcon(myIcon1); button.setRolloverIcon(myIcon2); button.setPressedIcon(myIcon3); button.setDisabledIcon(myIcon4);
public DataControl(String nodePath, Port port) { super(nodePath, port); setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS)); clearDataButton = new JButton("Clear"); clearDataButton.setMargin(new Insets(1, 0, 0, 0)); clearDataButton.putClientProperty("JButton.buttonType", "textured"); clearDataButton.putClientProperty("JComponent.sizeVariant", "small"); clearDataButton.setFont(Theme.SMALL_BOLD_FONT); clearDataButton.setForeground(Theme.TEXT_NORMAL_COLOR); clearDataButton.addActionListener(this); add(clearDataButton); /*showDataButton = new JButton("Show Data..."); showDataButton.setMargin(new Insets(1, 0, 0, 0)); showDataButton.putClientProperty("JButton.buttonType", "textured"); showDataButton.putClientProperty("JComponent.sizeVariant", "small"); showDataButton.setFont(Theme.SMALL_BOLD_FONT); showDataButton.setForeground(Theme.TEXT_NORMAL_COLOR); showDataButton.addActionListener(this); add(showDataButton);*/ add(Box.createHorizontalGlue()); }
btnConnect.setMargin(new java.awt.Insets(2, 2, 2, 2)); btnConnect.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancel.setMargin(new java.awt.Insets(2, 2, 2, 2)); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRegister.setMargin(new java.awt.Insets(2, 2, 2, 2)); btnRegister.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnForgotPassword.setMargin(new java.awt.Insets(2, 2, 2, 2)); btnForgotPassword.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnFindMain.setActionCommand("connectXmageDe"); btnFindMain.setAlignmentY(0.0F); btnFindMain.setMargin(new java.awt.Insets(2, 2, 2, 2)); btnFindMain.setMaximumSize(new java.awt.Dimension(42, 23)); btnFindMain.setMinimumSize(new java.awt.Dimension(42, 23)); btnFindLocal.setAlignmentY(0.0F); btnFindLocal.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnFindLocal.setMargin(new java.awt.Insets(2, 2, 2, 2)); btnFindLocal.setName("connectLocalhostBtn"); // NOI18N btnFindLocal.setPreferredSize(new java.awt.Dimension(23, 23)); btnFindBeta.setAlignmentY(0.0F);
jToggleListView.setFocusable(false); jToggleListView.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jToggleListView.setMargin(new java.awt.Insets(2, 2, 2, 2)); jToggleListView.setMaximumSize(new java.awt.Dimension(37, 22)); jToggleListView.setMinimumSize(new java.awt.Dimension(37, 22)); jToggleCardView.setFocusable(false); jToggleCardView.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jToggleCardView.setMargin(new java.awt.Insets(2, 2, 2, 2)); jToggleCardView.setMaximumSize(new java.awt.Dimension(37, 22)); jToggleCardView.setMinimumSize(new java.awt.Dimension(37, 22)); jButtonAddToMain.setMargin(null); jButtonAddToMain.setMaximumSize(new java.awt.Dimension(35, 23)); jButtonAddToMain.setMinimumSize(new java.awt.Dimension(35, 23)); jButtonRemoveFromMain.setMargin(null); jButtonRemoveFromMain.setMaximumSize(new java.awt.Dimension(42, 23)); jButtonRemoveFromMain.setMinimumSize(new java.awt.Dimension(42, 23)); jButtonAddToSideboard.setMargin(new java.awt.Insets(2, 0, 2, 0)); jButtonAddToSideboard.setMaximumSize(new java.awt.Dimension(100, 30)); jButtonAddToSideboard.setMinimumSize(new java.awt.Dimension(10, 30)); jButtonRemoveFromSideboard.setMargin(new java.awt.Insets(2, 0, 2, 0)); jButtonRemoveFromSideboard.setMaximumSize(new java.awt.Dimension(10, 30)); jButtonRemoveFromSideboard.setMinimumSize(new java.awt.Dimension(100, 30));
btnNewTable.setMargin(new java.awt.Insets(2, 2, 2, 2)); btnNewTable.addActionListener(evt -> btnNewTableActionPerformed(evt)); btnNewTournament.setMargin(new java.awt.Insets(2, 2, 2, 2)); btnNewTournament.addActionListener(evt -> btnNewTournamentActionPerformed(evt));
lines = new char[][]{...}; for (int outter = 0; outter < lines.length; outter++) { JPanel panel = new JPanel(new GridBagLayout()); for (int inner = 0; inner < lines[outter].length) { char ch = lines[outter][inner]; JButton btn = new JButton(Character.toString(ch)); btn.setMargin(new Insets(10, 10, 10, 10)); panel.add(btn); } add(panel, gbc); gbc.gridy++; }
public static JButton createButton(ImageIcon icon, String tip, ActionListener action ) { JButton btn = new JButton(); btn.setToolTipText(tip); btn.setIcon(icon); btn.setMargin(new Insets(0, 0, 0, 0)); if (action != null) btn.addActionListener(action); btn.setFocusable(false); btn.setFocusPainted(false); return btn; }
public static JButton createButton16(final ImageIcon icon, final String toolTip) { final JButton newButton = new JButton(); newButton.setMargin(new Insets(0, 0, 0, 0)); newButton.setMinimumSize(new Dimension(16, 16)); if (toolTip != null) { newButton.setToolTipText(toolTip); } newButton.setIcon(icon); return newButton; }
public static JButton createButton16(ImageIcon icon, String toolTip) { JButton newButton = new JButton(); newButton.setMargin(new Insets(0, 0, 0, 0)); newButton.setMinimumSize(new Dimension(16, 16)); if (toolTip != null) { newButton.setToolTipText(toolTip); } newButton.setIcon(icon); return newButton; }