List of usage examples for javax.swing JLabel setText
@BeanProperty(preferred = true, visualUpdate = true, description = "Defines the single line of text this component will display.") public void setText(String text)
From source file:edu.harvard.i2b2.query.QueryTopPanel.java
private void jAndOrLabelMouseClicked(java.awt.event.MouseEvent evt) { JLabel label = (JLabel) evt.getSource(); if (label.getText().equalsIgnoreCase("and")) { label.setText("or"); } else if (label.getText().equalsIgnoreCase("or")) { label.setText("and"); }//from ww w. j a v a 2s . c om }
From source file:edu.harvard.i2b2.query.QueryTopPanel.java
public void addPanel() { int rightmostPosition = dataModel.lastLabelPosition(); JLabel label = new JLabel(); label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); label.setText("and"); label.setToolTipText("Click to change the relationship"); label.setBorder(javax.swing.BorderFactory.createEtchedBorder()); label.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jAndOrLabelMouseClicked(evt); }//w w w.j a va2 s . c o m }); //jPanel1.add(label); //label.setBounds(rightmostPosition, 90, 30, 18); QueryConceptTreePanel panel = new QueryConceptTreePanel("Group " + (dataModel.getCurrentPanelCount() + 1), this); jPanel1.add(panel); panel.setBounds(rightmostPosition + 5, 0, 180, getParent().getHeight() - 100); jPanel1.setPreferredSize(new Dimension(rightmostPosition + 5 + 181, 150)); jScrollPane4.setViewportView(jPanel1); dataModel.addPanel(panel, null, rightmostPosition + 5 + 180); jScrollPane4.getHorizontalScrollBar().setValue(jScrollPane4.getHorizontalScrollBar().getMaximum()); jScrollPane4.getHorizontalScrollBar().setUnitIncrement(40); }
From source file:fxts.stations.transport.tradingapi.TradingServerSession.java
private void setWaitDialogText(String aText) { MainFrame mainFrame = TradeApp.getInst().getMainFrame(); JLabel aLabel = null; if (mainFrame.getWaitDialog() != null && mainFrame.getWaitDialog().isVisible()) { aLabel = (JLabel) mainFrame.getWaitDialog().getContentPane().getComponent(0); }/*from ww w . ja va 2s. c om*/ if (aLabel != null) { aLabel.setText(aText); } }
From source file:be.ac.ua.comp.scarletnebula.gui.windows.ServerPropertiesWindow.java
private Component getSingleVNCComponent(final Server server) { return new ChangeableLabel(getVNCRep(server), new Executable<JLabel>() { @Override/* www .j a v a2s . com*/ public void run(final JLabel text) { final String result = JOptionPane.showInputDialog(ServerPropertiesWindow.this, "Enter the password you'd like to use to establish VNC connections to this server.", server.getVNCPassword()); if (result != null && !result.isEmpty()) { server.setVNCPassword(result); server.store(); text.setText(result); } } }); }
From source file:edu.harvard.i2b2.query.QueryTopPanel.java
private void jMorePanelsButtonActionPerformed(java.awt.event.ActionEvent evt) { if (dataModel.hasEmptyPanels()) { JOptionPane.showMessageDialog(this, "Please use an existing empty panel before adding a new one."); return;/*from www . ja va 2 s . c o m*/ } int rightmostPosition = dataModel.lastLabelPosition(); JLabel label = new JLabel(); label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); label.setText("and"); label.setToolTipText("Click to change the relationship"); label.setBorder(javax.swing.BorderFactory.createEtchedBorder()); label.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jAndOrLabelMouseClicked(evt); } }); //jPanel1.add(label); //label.setBounds(rightmostPosition, 90, 30, 18); QueryConceptTreePanel panel = new QueryConceptTreePanel("Group " + (dataModel.getCurrentPanelCount() + 1), this); jPanel1.add(panel); panel.setBounds(rightmostPosition + 5, 0, 180, getParent().getHeight() - 100); jPanel1.setPreferredSize(new Dimension(rightmostPosition + 5 + 181, getHeight() - 100)); jScrollPane4.setViewportView(jPanel1); dataModel.addPanel(panel, label, rightmostPosition + 5 + 180); /*System.out.println(jScrollPane4.getViewport().getExtentSize().width+":"+ jScrollPane4.getViewport().getExtentSize().height); System.out.println(jScrollPane4.getHorizontalScrollBar().getVisibleRect().width+":" +jScrollPane4.getHorizontalScrollBar().getVisibleRect().height); System.out.println(jScrollPane4.getHorizontalScrollBar().getVisibleAmount()); System.out.println(jScrollPane4.getHorizontalScrollBar().getValue());*/ jScrollPane4.getHorizontalScrollBar().setValue(jScrollPane4.getHorizontalScrollBar().getMaximum()); jScrollPane4.getHorizontalScrollBar().setUnitIncrement(40); //this.jScrollPane4.removeAll(); //this.jScrollPane4.setViewportView(jPanel1); //revalidate(); //jScrollPane3.setBounds(420, 0, 170, 300); //jScrollPane4.setBounds(20, 35, 335, 220); resizePanels(getParent().getWidth(), getParent().getHeight()); }
From source file:lol.search.RankedStatsPage.java
private void totalJLabel(JLabel label, String text, Color color) { label.setText(text); label.setForeground(color);// ww w . ja va2s.c o m label.setFont(new Font("Sen-Regular", Font.CENTER_BASELINE, 16)); //custom font }
From source file:com.hammurapi.jcapture.CaptureFrame.java
public CaptureFrame(final AbstractCaptureApplet applet) throws Exception { super("Screen capture"); setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("camera.png"))); setUndecorated(true);//from w ww . j a v a 2s. co m Translucener.makeFrameTranslucent(this); setAlwaysOnTop(true); this.applet = applet; captureConfig = new CaptureConfig(); captureConfig.load(applet.loadConfig()); captureConfig.setBackgroundProcessor(applet.getBackgroundProcessor()); //--- GUI construction --- capturePanel = new JPanel(); final JLabel dimensionsLabel = new JLabel(""); capturePanel.add(dimensionsLabel, BorderLayout.CENTER); capturePanel.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { super.componentResized(e); dimensionsLabel.setText(e.getComponent().getWidth() + " x " + e.getComponent().getHeight()); } }); JButton captureButton = new JButton(new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { Rectangle bounds = capturePanel.getBounds(); Point loc = bounds.getLocation(); SwingUtilities.convertPointToScreen(loc, capturePanel); bounds.setLocation(loc); Properties props = captureConfig.setRecordingRectangle(bounds); if (props != null) { getApplet().storeConfig(props); } capturing.set(true); setVisible(false); } }); captureButton.setText("Capture"); captureButton.setToolTipText("Create a snapshot of the screen"); capturePanel.add(captureButton, BorderLayout.CENTER); recordButton = new JButton(new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { Rectangle bounds = capturePanel.getBounds(); Point loc = bounds.getLocation(); SwingUtilities.convertPointToScreen(loc, capturePanel); bounds.setLocation(loc); Properties props = captureConfig.setRecordingRectangle(bounds); if (props != null) { getApplet().storeConfig(props); } recording.set(true); setVisible(false); } }); recordButton.setText("Record"); setRecordButtonState(); capturePanel.add(recordButton, BorderLayout.CENTER); JButton optionsButton = new JButton(new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { new CaptureOptionsDialog(CaptureFrame.this).setVisible(true); } }); optionsButton.setText("Options"); capturePanel.add(optionsButton, BorderLayout.CENTER); JButton cancelButton = new JButton(new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { CaptureFrame.this.setVisible(false); } }); cancelButton.setText("Cancel"); capturePanel.add(cancelButton, BorderLayout.CENTER); getContentPane().add(capturePanel, BorderLayout.CENTER); capturePanel.setBorder(new LineBorder(new java.awt.Color(0, 0, 0), 1, false)); if (captureConfig.getRecordingRectangle() == null) { setSize(400, 300); setLocationRelativeTo(null); } else { setBounds(captureConfig.getRecordingRectangle()); } Insets dragInsets = new Insets(5, 5, 5, 5); new ComponentResizer(dragInsets, this); ComponentMover cm = new ComponentMover(); cm.registerComponent(this); cm.setDragInsets(dragInsets); addComponentListener(new ComponentListener() { @Override public void componentShown(ComponentEvent e) { // TODO Auto-generated method stub } @Override public void componentResized(ComponentEvent e) { // TODO Auto-generated method stub } @Override public void componentMoved(ComponentEvent e) { // TODO Auto-generated method stub } @Override public void componentHidden(ComponentEvent e) { if (capturing.get()) { capturing.set(false); try { capture(); } catch (Exception ex) { ex.printStackTrace(); } } else if (recording.get()) { recording.set(false); record(); } } }); }
From source file:org.opendatakit.briefcase.ui.settings.SettingsPanelForm.java
/** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * * @noinspection ALL/* w ww . j a va2 s .c o m*/ */ private void $$$setupUI$$$() { createUIComponents(); container = new JPanel(); container.setLayout(new GridBagLayout()); storageLocationContainer = new JPanel(); storageLocationContainer.setLayout(new GridBagLayout()); GridBagConstraints gbc; gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 5; gbc.weightx = 1.0; gbc.fill = GridBagConstraints.HORIZONTAL; container.add(storageLocationContainer, gbc); storageLocationLabel = new JLabel(); storageLocationLabel.setText("Storage Location"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; storageLocationContainer.add(storageLocationLabel, gbc); storageLocationField = new JTextField(); storageLocationField.setEditable(false); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.weightx = 1.0; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; storageLocationContainer.add(storageLocationField, gbc); storageLocationButtons = new JPanel(); storageLocationButtons.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); gbc = new GridBagConstraints(); gbc.gridx = 3; gbc.gridy = 0; gbc.fill = GridBagConstraints.BOTH; storageLocationContainer.add(storageLocationButtons, gbc); storageLocationClearButton = new JButton(); storageLocationClearButton.setText("Clear"); storageLocationClearButton.setVisible(false); storageLocationButtons.add(storageLocationClearButton); storageLocationChooseButton = new JButton(); storageLocationChooseButton.setText("Choose..."); storageLocationButtons.add(storageLocationChooseButton); final JPanel spacer1 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.fill = GridBagConstraints.HORIZONTAL; storageLocationContainer.add(spacer1, gbc); pullInParallelField = new JCheckBox(); pullInParallelField.setText("Pull submissions in parallel (experimental)"); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.gridwidth = 5; gbc.anchor = GridBagConstraints.WEST; container.add(pullInParallelField, gbc); rememberPasswordsField = new JCheckBox(); rememberPasswordsField.setText("Remember passwords (unencrypted)"); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 7; gbc.gridwidth = 5; gbc.anchor = GridBagConstraints.WEST; container.add(rememberPasswordsField, gbc); sendUsageDataField = new JCheckBox(); sendUsageDataField.setText("Send usage data and crash logs to core developers"); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 9; gbc.gridwidth = 5; gbc.anchor = GridBagConstraints.WEST; container.add(sendUsageDataField, gbc); useHttpProxyField = new JCheckBox(); useHttpProxyField.setText("Use HTTP Proxy"); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 11; gbc.gridwidth = 5; gbc.anchor = GridBagConstraints.WEST; container.add(useHttpProxyField, gbc); final JPanel spacer2 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 12; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 0, 0, 20); container.add(spacer2, gbc); httpProxyJostLabel = new JLabel(); httpProxyJostLabel.setText("Host"); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 12; gbc.anchor = GridBagConstraints.WEST; container.add(httpProxyJostLabel, gbc); httpProxyHostField = new JTextField(); httpProxyHostField.setPreferredSize(new Dimension(150, 30)); httpProxyHostField.setText("127.0.0.1"); gbc = new GridBagConstraints(); gbc.gridx = 4; gbc.gridy = 12; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; container.add(httpProxyHostField, gbc); final JPanel spacer3 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 3; gbc.gridy = 12; gbc.fill = GridBagConstraints.HORIZONTAL; container.add(spacer3, gbc); httpProxyPortLabel = new JLabel(); httpProxyPortLabel.setText("Port"); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 13; gbc.anchor = GridBagConstraints.WEST; container.add(httpProxyPortLabel, gbc); final JPanel spacer4 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 5; gbc.gridy = 12; gbc.weightx = 1.0; gbc.fill = GridBagConstraints.HORIZONTAL; container.add(spacer4, gbc); httpProxyPortField.setPreferredSize(new Dimension(150, 30)); gbc = new GridBagConstraints(); gbc.gridx = 4; gbc.gridy = 13; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; container.add(httpProxyPortField, gbc); final JPanel spacer5 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 10; gbc.gridwidth = 5; gbc.fill = GridBagConstraints.VERTICAL; container.add(spacer5, gbc); final JPanel spacer6 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 6; gbc.gridy = 1; gbc.gridheight = 13; gbc.fill = GridBagConstraints.HORIZONTAL; container.add(spacer6, gbc); final JPanel spacer7 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.gridheight = 13; gbc.fill = GridBagConstraints.HORIZONTAL; container.add(spacer7, gbc); final JPanel spacer8 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.gridwidth = 5; gbc.fill = GridBagConstraints.VERTICAL; container.add(spacer8, gbc); final JPanel spacer9 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 14; gbc.gridwidth = 5; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.VERTICAL; container.add(spacer9, gbc); final JPanel spacer10 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 8; gbc.gridwidth = 5; gbc.fill = GridBagConstraints.VERTICAL; container.add(spacer10, gbc); final JPanel spacer11 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 4; gbc.gridwidth = 5; gbc.fill = GridBagConstraints.VERTICAL; container.add(spacer11, gbc); final JPanel panel1 = new JPanel(); panel1.setLayout(new GridBagLayout()); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 15; gbc.gridwidth = 5; gbc.fill = GridBagConstraints.BOTH; container.add(panel1, gbc); panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Troubleshooting")); reloadCacheButton = new JButton(); reloadCacheButton.setEnabled(false); reloadCacheButton.setText("Reload forms from storage location"); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 8; gbc.fill = GridBagConstraints.HORIZONTAL; panel1.add(reloadCacheButton, gbc); final JPanel spacer12 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 7; gbc.fill = GridBagConstraints.VERTICAL; panel1.add(spacer12, gbc); final JPanel spacer13 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 9; gbc.fill = GridBagConstraints.VERTICAL; panel1.add(spacer13, gbc); final JPanel spacer14 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 3; gbc.gridy = 8; gbc.weightx = 0.5; gbc.fill = GridBagConstraints.HORIZONTAL; panel1.add(spacer14, gbc); final JPanel spacer15 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 8; gbc.weightx = 0.5; gbc.fill = GridBagConstraints.HORIZONTAL; panel1.add(spacer15, gbc); final JLabel label1 = new JLabel(); label1.setText("The form list in Briefcase can get out of date if files are moved manually."); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.gridwidth = 3; gbc.anchor = GridBagConstraints.WEST; panel1.add(label1, gbc); final JLabel label2 = new JLabel(); label2.setText("This reload is always safe."); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.gridwidth = 3; gbc.anchor = GridBagConstraints.WEST; panel1.add(label2, gbc); final JPanel spacer16 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.fill = GridBagConstraints.HORIZONTAL; panel1.add(spacer16, gbc); final JPanel spacer17 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.fill = GridBagConstraints.VERTICAL; panel1.add(spacer17, gbc); final JPanel spacer18 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 4; gbc.gridy = 5; gbc.fill = GridBagConstraints.HORIZONTAL; panel1.add(spacer18, gbc); final JPanel spacer19 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 4; gbc.fill = GridBagConstraints.VERTICAL; panel1.add(spacer19, gbc); cleanAllPullResumePointsButton = new JButton(); cleanAllPullResumePointsButton.setEnabled(false); cleanAllPullResumePointsButton.setText("Clear pull history"); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 3; gbc.fill = GridBagConstraints.HORIZONTAL; panel1.add(cleanAllPullResumePointsButton, gbc); final JLabel label3 = new JLabel(); label3.setText("Use if you wish to pull every submission, regardless of last submission pulled."); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 3; gbc.anchor = GridBagConstraints.WEST; panel1.add(label3, gbc); final JPanel spacer20 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 2; gbc.fill = GridBagConstraints.VERTICAL; panel1.add(spacer20, gbc); final JPanel spacer21 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 16; gbc.gridwidth = 6; gbc.fill = GridBagConstraints.VERTICAL; container.add(spacer21, gbc); resumeLastPullField = new JCheckBox(); resumeLastPullField.setText("Start pull from last submission pulled"); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.gridwidth = 5; gbc.anchor = GridBagConstraints.WEST; container.add(resumeLastPullField, gbc); final JPanel spacer22 = new JPanel(); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.gridwidth = 5; gbc.fill = GridBagConstraints.VERTICAL; container.add(spacer22, gbc); }
From source file:com.floreantpos.ui.views.payment.GroupSettleTicketDialog.java
private JPanel createTicketInfoPanel() { JLabel lblTicket = new javax.swing.JLabel(); lblTicket.setText(Messages.getString("SettleTicketDialog.0")); //$NON-NLS-1$ labelTicketNumber = new JLabel(); lblTable = new javax.swing.JLabel(); lblTable.setText(POSConstants.TABLES); //$NON-NLS-1$ labelTableNumber = new JLabel(); lblCustomer = new javax.swing.JLabel(); lblCustomer.setText("Customer:"); //$NON-NLS-1$ labelCustomer = new JLabel(); JPanel ticketInfoPanel = new com.floreantpos.swing.TransparentPanel( new MigLayout("wrap 2,fill, hidemode 3", "[][grow]", "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ticketInfoPanel.add(lblTicket);//from w w w . ja va 2s .c om ticketInfoPanel.add(labelTicketNumber, "grow"); //$NON-NLS-1$ ticketInfoPanel.add(lblTable); ticketInfoPanel.add(labelTableNumber, "grow"); //$NON-NLS-1$ ticketInfoPanel.add(lblCustomer); ticketInfoPanel.add(labelCustomer, "grow"); //$NON-NLS-1$ return ticketInfoPanel; }
From source file:com.sec.ose.osi.ui.frm.login.JPanLogin.java
private JPanel getJPanelProxyInfo() { if (jPanelProxyInfo == null) { jPanelProxyInfo = new JPanel(); jPanelProxyInfo.setLayout(new GridBagLayout()); // Proxy Host JLabel jLabelProxyHost = new JLabel("Proxy Host :"); jLabelProxyHost.setHorizontalAlignment(SwingConstants.RIGHT); GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.gridy = 0;/* w w w .j ava 2 s. c om*/ gridBagConstraints.gridx = 0; gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new Insets(0, 10, 0, 0); jPanelProxyInfo.add(jLabelProxyHost, gridBagConstraints); GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); gridBagConstraints1.fill = GridBagConstraints.BOTH; gridBagConstraints1.gridy = 0; gridBagConstraints1.gridx = 1; gridBagConstraints1.weightx = 0.5; gridBagConstraints1.insets = new Insets(5, 5, 5, 5); jPanelProxyInfo.add(getJTextProxyHost(), gridBagConstraints1); // Proxy Port JLabel jLabelProxyPort = new JLabel("Port :"); jLabelProxyPort.setHorizontalAlignment(SwingConstants.RIGHT); GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); gridBagConstraints2.gridy = 0; gridBagConstraints2.gridx = 2; gridBagConstraints2.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints2.insets = new Insets(0, 10, 0, 0); jPanelProxyInfo.add(jLabelProxyPort, gridBagConstraints2); GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConstraints3.fill = GridBagConstraints.BOTH; gridBagConstraints3.gridy = 0; gridBagConstraints3.gridx = 3; gridBagConstraints3.weightx = 0.5; gridBagConstraints3.insets = new Insets(5, 5, 5, 5); jPanelProxyInfo.add(getJTextProxyPort(), gridBagConstraints3); // Proxy Bypass JLabel jLabelProxyBypass = new JLabel(); jLabelProxyBypass.setText(" Proxy Bypass :"); jLabelProxyBypass.setHorizontalAlignment(SwingConstants.RIGHT); jLabelProxyBypass.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED); GridBagConstraints gridBagConstraints11 = new GridBagConstraints(); gridBagConstraints11.gridy = 1; gridBagConstraints11.gridx = 0; gridBagConstraints11.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints11.insets = new Insets(0, 10, 5, 0); jPanelProxyInfo.add(jLabelProxyBypass, gridBagConstraints11); GridBagConstraints gridBagConstraints21 = new GridBagConstraints(); gridBagConstraints21.gridy = 1; gridBagConstraints21.gridx = 1; gridBagConstraints21.gridwidth = 3; //gridBagConstraints21.weightx = 1.0; gridBagConstraints21.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints21.insets = new Insets(5, 5, 10, 5); jPanelProxyInfo.add(getJTextProxyBypass(), gridBagConstraints21); } return jPanelProxyInfo; }