Refine search
JPanel fontPanel = new JPanel(); systemFontRadio = new JRadioButton("System:", true); systemFontRadio.setMargin(new Insets(0, 0, 0, 0)); fontFileRadio = new JRadioButton("File:"); fontFileRadio.setMargin(new Insets(0, 0, 0, 0)); fontFileText = new JTextField(); GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0)); freeTypeRadio = new JRadioButton("FreeType"); javaRadio = new JRadioButton("Java"); nativeRadio = new JRadioButton("Native"); freeTypeRadio.setSelected(true); sampleTextRadio = new JRadioButton("Sample text"); sampleTextRadio.setSelected(true); glyphCacheRadio = new JRadioButton("Glyph cache");
@Override public void actionPerformed(ActionEvent actionEvent) { if (loganSquareCB.isSelected()) { annotationFT.setText(Constant.loganSquareAnnotation); } annotationFT.setEnabled(otherRB.isSelected()); objectFromDataCB.setEnabled(false); objectFromData1CB.setEnabled(false); arrayFromDataCB.setEnabled(false); arrayFromData1CB.setEnabled(false); objectFromDataCB.setSelected(false); objectFromData1CB.setSelected(false); arrayFromDataCB.setSelected(false); arrayFromData1CB.setSelected(false); objectButton.setEnabled(false); object1Button.setEnabled(false); arrayButton.setEnabled(false); array1Button.setEnabled(false); } });
jfc.addChoosableFileFilter(new RCFileFilter(FileType.ARCHIVE_EXT)); ButtonGroup group = new ButtonGroup(); group.add(jrb_archive); group.add(jrb_last); jrb_archive.setSelected(true); jrb_archive.addActionListener(al); jrb_last.addActionListener(al); c.setLayout(new BorderLayout()); JPanel jp_center = new JPanel(); jp_center.setBorder(BorderFactory.createTitledBorder("Run Test")); jp_center.setLayout(new GridLayout(3, 1)); c.add(jp_center, BorderLayout.CENTER); jb_next.setMnemonic('n'); c.add(jp_south, BorderLayout.SOUTH);
SslModeComponent() { super(); setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); fullModeRadioButton = new JRadioButton("Full Verification"); fullModeRadioButton.putClientProperty("SSL_MODE", AgentBootstrapperArgs.SslMode.FULL); fullModeRadioButton.setToolTipText("Perform a complete SSL verification before connecting to the agent."); noneModeRadioButton = new JRadioButton("No verification"); noneModeRadioButton.putClientProperty("SSL_MODE", AgentBootstrapperArgs.SslMode.NONE); noneModeRadioButton.setToolTipText("Completely disable any SSL verification"); noHostVerifyModeRadioButton = new JRadioButton("Don't verify host"); noHostVerifyModeRadioButton.putClientProperty("SSL_MODE", AgentBootstrapperArgs.SslMode.NO_VERIFY_HOST); noHostVerifyModeRadioButton.setToolTipText("Verify the server certificate, but not the hostname."); ButtonGroup sslModeButtonGroup = new ButtonGroup(); ActionListener actionListener = e -> { JRadioButton b = (JRadioButton) e.getSource(); setSslMode((AgentBootstrapperArgs.SslMode) b.getClientProperty("SSL_MODE")); }; for (JRadioButton button : Arrays.asList(fullModeRadioButton, noneModeRadioButton, noHostVerifyModeRadioButton)) { sslModeButtonGroup.add(button); add(button); button.addActionListener(actionListener); } }
private JPanel createXPathVersionPanel() { JPanel p = new JPanel(); p.add(new JLabel("XPath Version:")); for (Entry<String, String> values : XPathRule.VERSION_DESCRIPTOR.mappings().entrySet()) { JRadioButton b = new JRadioButton(); b.setText(values.getKey()); b.setActionCommand(b.getText()); if (values.getKey().equals(XPathRule.VERSION_DESCRIPTOR.defaultValue())) { b.setSelected(true); } xpathVersionButtonGroup.add(b); p.add(b); } return p; }
JPanel contentPanel = getContentPanel(); JButton defaultButton = new JButton("Default"); JLabel label = new JLabel("Sprite mode:"); modesPanel.add(label); ButtonGroup checkboxGroup = new ButtonGroup(); JRadioButton singleCheckbox = new JRadioButton("Single", editor.getEmitter().getSpriteMode() == SpriteMode.single); modesPanel.add(singleCheckbox); checkboxGroup.add(singleCheckbox); singleCheckbox.addItemListener(new ItemListener() { @Override public void itemStateChanged (ItemEvent e) { JRadioButton randomCheckbox = new JRadioButton("Random", editor.getEmitter().getSpriteMode() == SpriteMode.random); modesPanel.add(randomCheckbox); checkboxGroup.add(randomCheckbox); randomCheckbox.addItemListener(new ItemListener() { @Override public void itemStateChanged (ItemEvent e) { JRadioButton animatedCheckbox = new JRadioButton("Animated", editor.getEmitter().getSpriteMode() == SpriteMode.animated); animatedCheckbox.addItemListener(new ItemListener() { @Override public void itemStateChanged (ItemEvent e) {
java.awt.GridBagConstraints gridBagConstraints; tfSoxPath = new javax.swing.JTextField(); bBrowseSoxPath = new javax.swing.JButton(); cbTrimSilences = new javax.swing.JCheckBox(); jPanel2 = new javax.swing.JPanel(); rbLeft = new javax.swing.JRadioButton(); rbRight = new javax.swing.JRadioButton(); rbBoth = new javax.swing.JRadioButton(); jPanel1.setLayout(new java.awt.GridBagLayout()); buttonGroup1.add(rbLeft); rbLeft.setSelected(true); rbLeft.setText("left"); rbLeft.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbLeft.setMargin(new java.awt.Insets(0, 0, 0, 0)); buttonGroup1.add(rbRight); rbRight.setText("right"); rbRight.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbRight.setMargin(new java.awt.Insets(0, 0, 0, 0)); rbBoth.setText("both"); rbBoth.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); rbBoth.setMargin(new java.awt.Insets(0, 0, 0, 0));
syncAsyncSwitchGroup = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); requestCountField = new javax.swing.JTextField(); syncRadio = new javax.swing.JRadioButton(); asyncRadio = new javax.swing.JRadioButton(); uriField = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); runButton = new javax.swing.JButton(); messagePanel = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); requestCountField.setHorizontalAlignment(javax.swing.JTextField.RIGHT); syncAsyncSwitchGroup.add(syncRadio); syncRadio.setText("sync"); syncAsyncSwitchGroup.add(asyncRadio); asyncRadio.setSelected(true); asyncRadio.setText("async"); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
this.setLayout(borderLayoutPreferences); this.radioIsTamperingSpaceToMultilineComment.setToolTipText(tooltipIsTamperingSpaceToMultilineComment); this.radioIsTamperingSpaceToMultilineComment.setFocusable(false); this.radioIsTamperingSpaceToMultilineComment.setSelected(!this.radioIsTamperingSpaceToMultilineComment.isSelected()); this.actionListenerSave.actionPerformed(null); }); this.radioIsTamperingSpaceToDashComment.setToolTipText(tooltipIsTamperingSpaceToDashComment); this.radioIsTamperingSpaceToDashComment.setFocusable(false); this.radioIsTamperingSpaceToDashComment.setSelected(!this.radioIsTamperingSpaceToDashComment.isSelected()); this.actionListenerSave.actionPerformed(null); }); this.radioIsTamperingSpaceToSharpComment.setToolTipText(tooltipIsTamperingSpaceToSharpComment); this.radioIsTamperingSpaceToSharpComment.setFocusable(false); this.radioIsTamperingSpaceToSharpComment.setSelected(!this.radioIsTamperingSpaceToSharpComment.isSelected()); this.actionListenerSave.actionPerformed(null); }); this.checkboxIsTamperingEqualToLike.addActionListener(this.actionListenerSave); this.checkboxIsTamperingRandomCase.addActionListener(this.actionListenerSave); this.radioIsTamperingSpaceToMultilineComment.addActionListener(this.actionListenerSave); this.radioIsTamperingSpaceToDashComment.addActionListener(this.actionListenerSave); this.radioIsTamperingSpaceToSharpComment.addActionListener(this.actionListenerSave);
panelInput = new JPanel(new GridLayout(1, 2, 10, 0)); JPanel panelFrom = new JPanel(new BorderLayout()); JPanel panelTo = new JPanel(new BorderLayout()); svgFrom = new SVGDrawingPanel(); svgFrom.setPreferredSize(new Dimension(190, 200)); svgTo.setPreferredSize(new Dimension(190, 200)); btnEditFrom = new JButton("Edit Path"); btnEditTo = new JButton("Edit Path"); btnSvgFrom = new JButton("Load SVG"); ButtonGroup btngrop = new ButtonGroup(); radioStrategyBase = new JRadioButton("Base"); radioStrategyBase.setSelected(true); radioStrategyLinear = new JRadioButton("Linear"); radioStrategySubBase = new JRadioButton("Subalign Base"); radioStrategySubLinear = new JRadioButton("Subalign Linear"); btngrop.add(radioStrategyBase); btngrop.add(radioStrategyLinear); panelStrokeSize.add(new JLabel("Stroke size: "), BorderLayout.WEST); SpinnerModel spinnerModel = new SpinnerNumberModel(2, //initial value
private void init(){ ButtonGroup bg = new ButtonGroup(); jrb_encode.setMnemonic('e'); jrb_encode.setSelected(true); jrb_decode.setMnemonic('d'); bg.add(jrb_encode); bg.add(jrb_decode); jtf_out.setEditable(false); JPanel jp = new JPanel(); jp.setBorder(BorderFactory.createEmptyBorder( RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH)); jp.setLayout(new BorderLayout()); JPanel jp_center_west = new JPanel(); jp_center_west.setLayout(new GridLayout(2, 1, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH)); JLabel jl_in = new JLabel("Input: "); jl_in.setDisplayedMnemonic('i'); jl_in.setLabelFor(jtf_in); JLabel jl_out = new JLabel("Output: "); jp_center_west.add(jl_in);
JLabel label1 = new JLabel("Choose format:"); label1.setAlignmentX(Component.LEFT_ALIGNMENT); label1.setForeground(Color.white); btnSetFastSearch = new JButton(); small3x3 = new JRadioButton("3x3"); small3x3.setForeground(Color.white); boolean selected3x3 = MageFrame.getPreferences().get(LAYOYT_CONFIG_KEY, MageBook.LAYOUT_3x3).equals(MageBook.LAYOUT_3x3); small3x3.setSelected(selected3x3); small3x3.addActionListener(e -> { big4x4.setSelected(false); mageBook.updateSize(MageBook.LAYOUT_3x3); MageFrame.getPreferences().put(LAYOYT_CONFIG_KEY, MageBook.LAYOUT_3x3); big4x4 = new JRadioButton("4x4"); big4x4.setForeground(Color.white); big4x4.setSelected(!selected3x3); big4x4.addActionListener(e -> { small3x3.setSelected(false); mageBook.updateSize(MageBook.LAYOUT_4x4); MageFrame.getPreferences().put(LAYOYT_CONFIG_KEY, MageBook.LAYOUT_4x4);
import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.ButtonGroup; import javax.swing.JFrame; import javax.swing.JRadioButton; public class Rb extends JFrame { Rb (){ JRadioButton male = new JRadioButton("male"); JRadioButton female = new JRadioButton("Female"); ButtonGroup bG = new ButtonGroup(); bG.add(male); bG.add(female); this.setSize(100,200); this.setLayout( new FlowLayout()); this.add(male); this.add(female); male.setSelected(true); this.setVisible(true); } public static void main(String args[]){ Rb j = new Rb(); }
public OptionsConnectionPanel() { ButtonGroup bg = new ButtonGroup(); bg.add(jrb_minutes); bg.add(jrb_seconds); bg.add(jrb_millisecs); jrb_millisecs.setSelected(true); lastSelected = MILLISECONDS; jrb_minutes.addActionListener(al); jrb_seconds.addActionListener(al); jrb_millisecs.addActionListener(al); JPanel jp_radio = new JPanel(); jp_radio.setLayout(new FlowLayout(FlowLayout.LEFT)); jp_radio.add(jrb_minutes); jp_radio.add(jrb_seconds); jp_radio.add(jrb_millisecs); JPanel jp_label_grid = new JPanel(); jp_label_grid.setLayout(new GridLayout(2, 1)); jp_label_grid.add(new JLabel("Timeout in: ")); jp_label_grid.add(new JLabel("Value: ")); JPanel jp_input_grid = new JPanel();
I18nView.addComponentForKey("FIELD_HEADER_TOOLTIP", j3[0]); final JPanel panelHttpProtocol = new JPanel(); panelHttpProtocol.setLayout(new BoxLayout(panelHttpProtocol, BoxLayout.LINE_AXIS)); panelHttpProtocol.setMaximumSize(new Dimension(Integer.MAX_VALUE, 16)); buttonRequestMethod.setBorderPainted(false); buttonRequestMethod.setOpaque(false); final ButtonGroup buttonGroup = new ButtonGroup(); final JTextField inputCustomMethod = new JPopupTextField("CUSTOM").getProxy(); final JRadioButton radioCustomMethod = new JRadioButton(); radioCustomMethod.setBorder(BorderFactory.createEmptyBorder(0, 6, 0, 0)); radioCustomMethod.setIcon(new RadioMenuItemIconCustom()); radioCustomMethod.addActionListener(actionEvent -> { if (!"".equals(inputCustomMethod.getText())) { PanelAddressBar.this.typeRequest = inputCustomMethod.getText(); this.radioMethod.setText(PanelAddressBar.this.typeRequest); } else { popup.insert(panelCustomMethod, popup.getComponentCount()); this.textFieldAddress.setToolTipText(I18n.valueByKey("FIELD_QUERYSTRING_TOOLTIP")); new ComponentBorder(new JComboBox<>(new String[]{"a", "z"}), 17, 0).install(this.textFieldAddress);
private JComponent makePrefsPanel() { JPanel pane = new JPanel(); pane.setLayout(new GridLayout(0, 2)); pane.add(walkCheckBox); JLabel dummyLabel = new JLabel(""); JLabel arriveByLabel = new JLabel("Arrive by?:"); JLabel boardPenaltyLabel = new JLabel("Boarding penalty (min):"); pane.add(boardPenaltyLabel); boardingPenaltyField = new JTextField("5"); maxWalkField = new JTextField("5000"); walkSpeed = new JTextField("1.33"); opQuick = new JRadioButton("Quick"); opQuick.setSelected(true); opSafe = new JRadioButton("Safe"); opFlat = new JRadioButton("Flat"); opGreenways = new JRadioButton("Greenways"); optimizeTypeGrp = new ButtonGroup(); optimizeTypeGrp.add(opQuick); optimizeTypeGrp.add(opSafe);
final JFrame f = new JFrame("Frame Test"); JPanel panel = new JPanel(new GridBagLayout()); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1.0; panel.add(new JTextField(), gbc); JPanel numSysPanel = new JPanel(new GridLayout(1, 3)); numSysPanel.setBorder(BorderFactory.createTitledBorder("Number System")); numSysPanel.add(new JRadioButton("oct")); numSysPanel.add(new JRadioButton("dec")); numSysPanel.add(new JRadioButton("hex")); panel.add(numSysPanel, gbc); JPanel buttons = new JPanel(new GridLayout(4, 4, 2, 2)); for (int i = 0; i < 16; i++) buttons.add(new JButton("" + i)); panel.add(buttons, gbc);
@PostConstruct protected void init() { jtf_custom.setEnabled(false); ButtonGroup bg = new ButtonGroup(); bg.add(jrb_req_get); bg.add(jrb_req_post); bg.add(jrb_req_put); bg.add(jrb_req_patch); jrb_req_get.setSelected(true); jrb_req_get.setMnemonic('g'); jrb_req_post.setMnemonic('p'); jrb_req_put.setMnemonic('t'); jrb_req_delete.setMnemonic('d'); jrb_req_get.addActionListener(jrbAL); jrb_req_post.addActionListener(jrbAL); jrb_req_put.addActionListener(jrbAL); jrb_req_patch.addActionListener(jrbAL); jrb_req_delete.addActionListener(jrbAL); jrb_req_head.addActionListener(jrbAL); jrb_req_options.addActionListener(jrbAL); jrb_req_trace.addActionListener(jrbAL); jrb_req_custom.addActionListener(jrbAL);
private JPanel buildConfigurationPanel() { final JPanel configPanel = new JPanel(new GridBagLayout()); final JLabel informationLabel = new JLabel(CheckStyleBundle.message("config.module.information"), Icons.icon("/general/information.png"), SwingConstants.LEFT); configPanel.add(informationLabel, new GridBagConstraints(0, 0, 2, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(16, 8), 0, 0)); useProjectConfigurationRadio.setText(CheckStyleBundle.message("config.module.project-configuration.text")); useProjectConfigurationRadio.setToolTipText(CheckStyleBundle.message("config.module.project-configuration.tooltip")); useProjectConfigurationRadio.addActionListener(new RadioListener()); useModuleConfigurationRadio.setText(CheckStyleBundle.message("config.module.module-configuration.text")); useModuleConfigurationRadio.setToolTipText(CheckStyleBundle.message("config.module.module-configuration.tooltip")); useModuleConfigurationRadio.addActionListener(new RadioListener()); excludeRadio.setText(CheckStyleBundle.message("config.module.exclude.text")); excludeRadio.setToolTipText(CheckStyleBundle.message("config.module.exclude.tooltip")); excludeRadio.addActionListener(new RadioListener()); configurationFilesLabel.setText(CheckStyleBundle.message("config.module.module-file.text")); configPanel.add(configurationFilesLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, JBUI.insets(8, 32, 8, 8), 0, 0)); GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, emptyInsets(), 0, 0)); useProjectConfigurationRadio.setSelected(true); configurationFilesLabel.setEnabled(false); configurationFilesCombo.setEnabled(false);
JPanel jPanel = new JPanel(); ButtonGroup group = new ButtonGroup(); btn1 = new JRadioButton("btn1 ");btn1.setSelected(true); btn2 = new JRadioButton("btn2 "); group.add(btn1 ); group.add(btn2 ); jPanel.add(btn1); jPanel.add(btn2).