List of usage examples for javax.swing JSplitPane setBorder
@BeanProperty(preferred = true, visualUpdate = true, description = "The component's border.") public void setBorder(Border border)
From source file:Main.java
public static void flattenSplitPane(JSplitPane jSplitPane) { UIDefaults defaults = javax.swing.UIManager.getDefaults(); final Color light = defaults.getColor("SplitPane.highlight"); final Color dark = defaults.getColor("SplitPane.darkShadow"); // */* w ww. j a v a 2s. c o m*/ jSplitPane.setUI(new BasicSplitPaneUI() { public BasicSplitPaneDivider createDefaultDivider() { BasicSplitPaneDivider divider = new BasicSplitPaneDivider(this) { private static final long serialVersionUID = 1L; @Override public int getDividerSize() { return 5; } @Override public void paint(Graphics g) { // super.paint(g); int orientation = this.getBasicSplitPaneUI().getOrientation(); Dimension size = this.getSize(); if (orientation == JSplitPane.VERTICAL_SPLIT) { int[] lines = new int[2]; lines[0] = 0; lines[1] = size.height - 2; for (int i = 0; i < size.width; i += 4) { for (int j = 0; j < lines.length; j++) { int y = lines[j]; g.setColor(light); g.fillRect(i, y, 2, 2); g.setColor(dark); g.fillRect(i, y, 1, 1); } } } else { int[] rows = new int[2]; rows[0] = 0; rows[1] = size.width - 2; for (int i = 0; i < size.height; i += 4) { for (int j = 0; j < rows.length; j++) { int x = rows[j]; g.setColor(light); g.fillRect(x, i, 2, 2); g.setColor(dark); g.fillRect(x, i, 1, 1); } } } } }; return divider; } }); jSplitPane.setBorder(null); // */ }
From source file:ca.uhn.hl7v2.testpanel.ui.TestPanelWindow.java
/** * Initialize the contents of the frame. *//*from w w w . ja v a2s . c om*/ private void initialize() { myframe = new JFrame(); myframe.setVisible(false); List<Image> l = new ArrayList<Image>(); l.add(Toolkit.getDefaultToolkit() .getImage(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/hapi_16.png"))); l.add(Toolkit.getDefaultToolkit() .getImage(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/hapi_64.png"))); myframe.setIconImages(l); myframe.setTitle("HAPI TestPanel"); myframe.setBounds(100, 100, 796, 603); myframe.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); myframe.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent theE) { myController.close(); } }); JMenuBar menuBar = new JMenuBar(); myframe.setJMenuBar(menuBar); JMenu mnFile = new JMenu("File"); mnFile.setMnemonic('f'); menuBar.add(mnFile); JMenuItem mntmExit = new JMenuItem("Exit"); mntmExit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { myController.close(); } }); JMenuItem mntmNewMessage = new JMenuItem("New Message..."); mntmNewMessage.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.addMessage(); } }); mntmNewMessage.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/message_hl7.png"))); mnFile.add(mntmNewMessage); mySaveMenuItem = new JMenuItem("Save"); mySaveMenuItem.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_S, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); mySaveMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doSaveMessages(); } }); mnFile.add(mySaveMenuItem); mySaveAsMenuItem = new JMenuItem("Save As..."); mySaveAsMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doSaveMessagesAs(); } }); mnFile.add(mySaveAsMenuItem); mymenuItem_3 = new JMenuItem("Open"); mymenuItem_3.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_O, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); mymenuItem_3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.openMessages(); } }); myRevertToSavedMenuItem = new JMenuItem("Revert to Saved"); myRevertToSavedMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.revertMessage((Hl7V2MessageCollection) myController.getLeftSelectedItem()); } }); mnFile.add(myRevertToSavedMenuItem); mnFile.add(mymenuItem_3); myRecentFilesMenu = new JMenu("Open Recent"); mnFile.add(myRecentFilesMenu); JSeparator separator = new JSeparator(); mnFile.add(separator); mnFile.add(mntmExit); JMenu mnNewMenu = new JMenu("View"); mnNewMenu.setMnemonic('v'); menuBar.add(mnNewMenu); myShowLogConsoleMenuItem = new JMenuItem("Show Log Console"); myShowLogConsoleMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Prefs.getInstance().setShowLogConsole(!Prefs.getInstance().getShowLogConsole()); updateLogScrollPaneVisibility(); myframe.validate(); } }); mnNewMenu.add(myShowLogConsoleMenuItem); mymenu_1 = new JMenu("Test"); menuBar.add(mymenu_1); mymenuItem_1 = new JMenuItem("Populate TestPanel with Sample Message and Connections..."); mymenuItem_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.populateWithSampleMessageAndConnections(); } }); mymenu_1.add(mymenuItem_1); mymenu_3 = new JMenu("Tools"); menuBar.add(mymenu_3); mnHl7V2FileDiff = new JMenuItem("HL7 v2 File Diff..."); mnHl7V2FileDiff.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (myHl7V2FileDiff == null) { myHl7V2FileDiff = new Hl7V2FileDiffController(myController); } myHl7V2FileDiff.show(); } }); mymenu_3.add(mnHl7V2FileDiff); mymenuItem_5 = new JMenuItem("HL7 v2 File Sort..."); mymenuItem_5.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (myHl7V2FileSort == null) { myHl7V2FileSort = new Hl7V2FileSortController(myController); } myHl7V2FileSort.show(); } }); mymenu_3.add(mymenuItem_5); mymenu_2 = new JMenu("Conformance"); menuBar.add(mymenu_2); mymenuItem_2 = new JMenuItem("Profiles and Tables..."); mymenuItem_2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.showProfilesAndTablesEditor(); } }); mymenu_2.add(mymenuItem_2); mymenu = new JMenu("Help"); mymenu.setMnemonic('H'); menuBar.add(mymenu); mymenuItem = new JMenuItem("About HAPI TestPanel..."); mymenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { showAboutDialog(); } }); mymenuItem.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/hapi_16.png"))); mymenu.add(mymenuItem); mymenuItem_4 = new JMenuItem("Licenses..."); mymenuItem_4.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { new LicensesDialog().setVisible(true); } }); mymenu.add(mymenuItem_4); myframe.getContentPane().setLayout(new BorderLayout(0, 0)); JSplitPane outerSplitPane = new JSplitPane(); outerSplitPane.setBorder(null); myframe.getContentPane().add(outerSplitPane); JSplitPane leftSplitPane = new JSplitPane(); leftSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); outerSplitPane.setLeftComponent(leftSplitPane); JPanel messagesPanel = new JPanel(); leftSplitPane.setLeftComponent(messagesPanel); GridBagLayout gbl_messagesPanel = new GridBagLayout(); gbl_messagesPanel.columnWidths = new int[] { 110, 0 }; gbl_messagesPanel.rowHeights = new int[] { 20, 30, 118, 0, 0 }; gbl_messagesPanel.columnWeights = new double[] { 1.0, Double.MIN_VALUE }; gbl_messagesPanel.rowWeights = new double[] { 0.0, 0.0, 100.0, 1.0, Double.MIN_VALUE }; messagesPanel.setLayout(gbl_messagesPanel); JLabel lblMessages = new JLabel("Messages"); GridBagConstraints gbc_lblMessages = new GridBagConstraints(); gbc_lblMessages.insets = new Insets(0, 0, 5, 0); gbc_lblMessages.gridx = 0; gbc_lblMessages.gridy = 0; messagesPanel.add(lblMessages, gbc_lblMessages); JToolBar messagesToolBar = new JToolBar(); messagesToolBar.setFloatable(false); messagesToolBar.setRollover(true); messagesToolBar.setAlignmentX(Component.LEFT_ALIGNMENT); GridBagConstraints gbc_messagesToolBar = new GridBagConstraints(); gbc_messagesToolBar.insets = new Insets(0, 0, 5, 0); gbc_messagesToolBar.weightx = 1.0; gbc_messagesToolBar.anchor = GridBagConstraints.NORTHWEST; gbc_messagesToolBar.gridx = 0; gbc_messagesToolBar.gridy = 1; messagesPanel.add(messagesToolBar, gbc_messagesToolBar); JButton msgOpenButton = new JButton(""); msgOpenButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.openMessages(); } }); myAddMessageButton = new JButton(""); myAddMessageButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.addMessage(); } }); myAddMessageButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/add.png"))); myAddMessageButton.setToolTipText("New Message"); myAddMessageButton.setBorderPainted(false); myAddMessageButton.addMouseListener(new HoverButtonMouseAdapter(myAddMessageButton)); messagesToolBar.add(myAddMessageButton); myDeleteMessageButton = new JButton(""); myDeleteMessageButton.setToolTipText("Close Selected Message"); myDeleteMessageButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.closeMessage((Hl7V2MessageCollection) myController.getLeftSelectedItem()); } }); myDeleteMessageButton.setBorderPainted(false); myDeleteMessageButton.addMouseListener(new HoverButtonMouseAdapter(myDeleteMessageButton)); myDeleteMessageButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/close.png"))); messagesToolBar.add(myDeleteMessageButton); msgOpenButton.setBorderPainted(false); msgOpenButton.setToolTipText("Open Messages from File"); msgOpenButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/open.png"))); msgOpenButton.addMouseListener(new HoverButtonMouseAdapter(msgOpenButton)); messagesToolBar.add(msgOpenButton); myMsgSaveButton = new JButton(""); myMsgSaveButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { doSaveMessages(); } }); myMsgSaveButton.setBorderPainted(false); myMsgSaveButton.setToolTipText("Save Selected Messages to File"); myMsgSaveButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/save.png"))); myMsgSaveButton.addMouseListener(new HoverButtonMouseAdapter(myMsgSaveButton)); messagesToolBar.add(myMsgSaveButton); myMessagesList = new JList(); myMessagesList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { if (myMessagesList.getSelectedIndex() >= 0) { ourLog.debug("New messages selection " + myMessagesList.getSelectedIndex()); myController.setLeftSelectedItem(myMessagesList.getSelectedValue()); myOutboundConnectionsList.clearSelection(); myOutboundConnectionsList.repaint(); myInboundConnectionsList.clearSelection(); myInboundConnectionsList.repaint(); } updateLeftToolbarButtons(); } }); GridBagConstraints gbc_MessagesList = new GridBagConstraints(); gbc_MessagesList.gridheight = 2; gbc_MessagesList.weightx = 1.0; gbc_MessagesList.weighty = 1.0; gbc_MessagesList.fill = GridBagConstraints.BOTH; gbc_MessagesList.gridx = 0; gbc_MessagesList.gridy = 2; messagesPanel.add(myMessagesList, gbc_MessagesList); JPanel connectionsPanel = new JPanel(); leftSplitPane.setRightComponent(connectionsPanel); GridBagLayout gbl_connectionsPanel = new GridBagLayout(); gbl_connectionsPanel.columnWidths = new int[] { 194, 0 }; gbl_connectionsPanel.rowHeights = new int[] { 0, 30, 0, 0, 0, 0, 0 }; gbl_connectionsPanel.columnWeights = new double[] { 1.0, Double.MIN_VALUE }; gbl_connectionsPanel.rowWeights = new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, Double.MIN_VALUE }; connectionsPanel.setLayout(gbl_connectionsPanel); JLabel lblConnections = new JLabel("Sending Connections"); lblConnections.setHorizontalAlignment(SwingConstants.CENTER); GridBagConstraints gbc_lblConnections = new GridBagConstraints(); gbc_lblConnections.insets = new Insets(0, 0, 5, 0); gbc_lblConnections.anchor = GridBagConstraints.NORTH; gbc_lblConnections.fill = GridBagConstraints.HORIZONTAL; gbc_lblConnections.gridx = 0; gbc_lblConnections.gridy = 0; connectionsPanel.add(lblConnections, gbc_lblConnections); JToolBar toolBar = new JToolBar(); toolBar.setFloatable(false); GridBagConstraints gbc_toolBar = new GridBagConstraints(); gbc_toolBar.insets = new Insets(0, 0, 5, 0); gbc_toolBar.anchor = GridBagConstraints.NORTH; gbc_toolBar.fill = GridBagConstraints.HORIZONTAL; gbc_toolBar.gridx = 0; gbc_toolBar.gridy = 1; connectionsPanel.add(toolBar, gbc_toolBar); myAddConnectionButton = new JButton(""); myAddConnectionButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.addOutboundConnection(); } }); myAddConnectionButton.setBorderPainted(false); myAddConnectionButton.addMouseListener(new HoverButtonMouseAdapter(myAddConnectionButton)); myAddConnectionButton.setBorder(null); myAddConnectionButton.setToolTipText("New Connection"); myAddConnectionButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/add.png"))); toolBar.add(myAddConnectionButton); myDeleteOutboundConnectionButton = new JButton(""); myDeleteOutboundConnectionButton.setToolTipText("Delete Selected Connection"); myDeleteOutboundConnectionButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (myController.getLeftSelectedItem() instanceof OutboundConnection) { myController.removeOutboundConnection((OutboundConnection) myController.getLeftSelectedItem()); } } }); myDeleteOutboundConnectionButton.setBorderPainted(false); myDeleteOutboundConnectionButton .addMouseListener(new HoverButtonMouseAdapter(myDeleteOutboundConnectionButton)); myDeleteOutboundConnectionButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/delete.png"))); toolBar.add(myDeleteOutboundConnectionButton); myStartOneOutboundButton = new JButton(""); myStartOneOutboundButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (myController.getLeftSelectedItem() instanceof OutboundConnection) { myController.startOutboundConnection((OutboundConnection) myController.getLeftSelectedItem()); } } }); myStartOneOutboundButton.setBorderPainted(false); myStartOneOutboundButton.setToolTipText("Start selected connection"); myStartOneOutboundButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/start_one.png"))); myStartOneOutboundButton.addMouseListener(new HoverButtonMouseAdapter(myStartOneOutboundButton)); toolBar.add(myStartOneOutboundButton); myStartAllOutboundButton = new JButton(""); myStartAllOutboundButton.setBorderPainted(false); myStartAllOutboundButton.setToolTipText("Start all sending connections"); myStartAllOutboundButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/start_all.png"))); myStartAllOutboundButton.addMouseListener(new HoverButtonMouseAdapter(myStartAllOutboundButton)); myStartAllOutboundButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent theE) { myController.startAllOutboundConnections(); } }); toolBar.add(myStartAllOutboundButton); myStopAllOutboundButton = new JButton(""); myStopAllOutboundButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.stopAllOutboundConnections(); } }); myStopAllOutboundButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/stop_all.png"))); myStopAllOutboundButton.setToolTipText("Stop all sending connections"); myStopAllOutboundButton.setBorderPainted(false); myStopAllOutboundButton.addMouseListener(new HoverButtonMouseAdapter(myStopAllOutboundButton)); toolBar.add(myStopAllOutboundButton); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBorder(null); GridBagConstraints gbc_scrollPane = new GridBagConstraints(); gbc_scrollPane.fill = GridBagConstraints.BOTH; gbc_scrollPane.insets = new Insets(0, 0, 5, 0); gbc_scrollPane.gridx = 0; gbc_scrollPane.gridy = 2; connectionsPanel.add(scrollPane, gbc_scrollPane); myOutboundConnectionsList = new JList(); myOutboundConnectionsList.setBorder(null); myOutboundConnectionsList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { if (myOutboundConnectionsList.getSelectedIndex() >= 0) { ourLog.debug( "New outbound connection selection " + myOutboundConnectionsList.getSelectedIndex()); myController.setLeftSelectedItem(myOutboundConnectionsList.getSelectedValue()); myMessagesList.clearSelection(); myMessagesList.repaint(); myInboundConnectionsList.clearSelection(); myInboundConnectionsList.repaint(); } updateLeftToolbarButtons(); } }); scrollPane.setViewportView(myOutboundConnectionsList); JLabel lblReceivingConnections = new JLabel("Receiving Connections"); lblReceivingConnections.setHorizontalAlignment(SwingConstants.CENTER); GridBagConstraints gbc_lblReceivingConnections = new GridBagConstraints(); gbc_lblReceivingConnections.insets = new Insets(0, 0, 5, 0); gbc_lblReceivingConnections.gridx = 0; gbc_lblReceivingConnections.gridy = 3; connectionsPanel.add(lblReceivingConnections, gbc_lblReceivingConnections); JToolBar toolBar_1 = new JToolBar(); toolBar_1.setFloatable(false); GridBagConstraints gbc_toolBar_1 = new GridBagConstraints(); gbc_toolBar_1.anchor = GridBagConstraints.WEST; gbc_toolBar_1.insets = new Insets(0, 0, 5, 0); gbc_toolBar_1.gridx = 0; gbc_toolBar_1.gridy = 4; connectionsPanel.add(toolBar_1, gbc_toolBar_1); myAddInboundConnectionButton = new JButton(""); myAddInboundConnectionButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.addInboundConnection(); } }); myAddInboundConnectionButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/add.png"))); myAddInboundConnectionButton.setToolTipText("New Connection"); myAddInboundConnectionButton.setBorderPainted(false); myAddInboundConnectionButton.addMouseListener(new HoverButtonMouseAdapter(myAddInboundConnectionButton)); toolBar_1.add(myAddInboundConnectionButton); myDeleteInboundConnectionButton = new JButton(""); myDeleteInboundConnectionButton.setToolTipText("Delete Selected Connection"); myDeleteInboundConnectionButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (myController.getLeftSelectedItem() instanceof InboundConnection) { myController.removeInboundConnection((InboundConnection) myController.getLeftSelectedItem()); } } }); myDeleteInboundConnectionButton.setBorderPainted(false); myDeleteInboundConnectionButton .addMouseListener(new HoverButtonMouseAdapter(myDeleteInboundConnectionButton)); myDeleteInboundConnectionButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/delete.png"))); toolBar_1.add(myDeleteInboundConnectionButton); myStartOneInboundButton = new JButton(""); myStartOneInboundButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (myController.getLeftSelectedItem() instanceof InboundConnection) { myController.startInboundConnection((InboundConnection) myController.getLeftSelectedItem()); } } }); myStartOneInboundButton.setBorderPainted(false); myStartOneInboundButton.setToolTipText("Start selected connection"); myStartOneInboundButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/start_one.png"))); myStartOneInboundButton.addMouseListener(new HoverButtonMouseAdapter(myStartOneInboundButton)); toolBar_1.add(myStartOneInboundButton); myStartAllInboundButton = new JButton(""); myStartAllInboundButton.setBorderPainted(false); myStartAllInboundButton.setToolTipText("Start all receiving connections"); myStartAllInboundButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/start_all.png"))); myStartAllInboundButton.addMouseListener(new HoverButtonMouseAdapter(myStartAllInboundButton)); myStartAllInboundButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent theE) { myController.startAllInboundConnections(); } }); toolBar_1.add(myStartAllInboundButton); myStopAllInboundButton = new JButton(""); myStopAllInboundButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { myController.stopAllInboundConnections(); } }); myStopAllInboundButton.setIcon( new ImageIcon(TestPanelWindow.class.getResource("/ca/uhn/hl7v2/testpanel/images/stop_all.png"))); myStopAllInboundButton.setToolTipText("Stop all receiving connections"); myStopAllInboundButton.setBorderPainted(false); myStopAllInboundButton.addMouseListener(new HoverButtonMouseAdapter(myStopAllInboundButton)); toolBar_1.add(myStopAllInboundButton); JScrollPane scrollPane_1 = new JScrollPane(); scrollPane_1.setBorder(null); GridBagConstraints gbc_scrollPane_1 = new GridBagConstraints(); gbc_scrollPane_1.fill = GridBagConstraints.BOTH; gbc_scrollPane_1.gridx = 0; gbc_scrollPane_1.gridy = 5; connectionsPanel.add(scrollPane_1, gbc_scrollPane_1); myInboundConnectionsList = new JList(); myInboundConnectionsList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { if (myInboundConnectionsList.getSelectedIndex() >= 0) { ourLog.debug("New inbound connection selection " + myInboundConnectionsList.getSelectedIndex()); myController.setLeftSelectedItem(myInboundConnectionsList.getSelectedValue()); myMessagesList.clearSelection(); myMessagesList.repaint(); myOutboundConnectionsList.clearSelection(); myOutboundConnectionsList.repaint(); myInboundConnectionsList.repaint(); } updateLeftToolbarButtons(); } }); scrollPane_1.setViewportView(myInboundConnectionsList); leftSplitPane.setDividerLocation(200); myWorkspacePanel = new JPanel(); myWorkspacePanel.setBorder(null); outerSplitPane.setRightComponent(myWorkspacePanel); myWorkspacePanel.setLayout(new BorderLayout(0, 0)); outerSplitPane.setDividerLocation(200); myLogScrollPane = new LogTable(); myLogScrollPane.setPreferredSize(new Dimension(454, 120)); myLogScrollPane.setMaximumSize(new Dimension(32767, 120)); myframe.getContentPane().add(myLogScrollPane, BorderLayout.SOUTH); updateLogScrollPaneVisibility(); updateLeftToolbarButtons(); }
From source file:net.sourceforge.squirrel_sql.client.gui.HelpViewerWindow.java
/** * Create user interface./*ww w . j a v a2s. com*/ */ private void createGUI() throws IOException { setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); final SquirrelResources rsrc = _app.getResources(); final ImageIcon icon = rsrc.getIcon(SquirrelResources.IImageNames.VIEW); if (icon != null) { setIconImage(icon.getImage()); } Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); splitPane.setBorder(BorderFactory.createEmptyBorder()); splitPane.setOneTouchExpandable(true); splitPane.setContinuousLayout(true); splitPane.add(createContentsTree(), JSplitPane.LEFT); splitPane.add(createDetailsPanel(), JSplitPane.RIGHT); contentPane.add(splitPane, BorderLayout.CENTER); splitPane.setDividerLocation(200); contentPane.add(new HtmlViewerPanelToolBar(_app, _detailPnl), BorderLayout.NORTH); Font fn = _app.getFontInfoStore().getStatusBarFontInfo().createFont(); _statusBar.setFont(fn); contentPane.add(_statusBar, BorderLayout.SOUTH); pack(); SwingUtilities.invokeLater(new Runnable() { public void run() { _detailPnl.setHomeURL(_homeURL); _tree.expandRow(0); _tree.expandRow(2); if (_app.getSquirrelPreferences().isFirstRun()) { _tree.setSelectionRow(1); } else { _tree.setSelectionRow(3); } _tree.setRootVisible(false); } }); _detailPnl.addListener(new IHtmlViewerPanelListener() { public void currentURLHasChanged(HtmlViewerPanelListenerEvent evt) { selectTreeNodeForURL(evt.getHtmlViewerPanel().getURL()); } public void homeURLHasChanged(HtmlViewerPanelListenerEvent evt) { // Nothing to do. } }); }
From source file:org.apache.jmeter.gui.MainFrame.java
/** * Create the GUI components and layout. *///w w w . j av a 2s. c o m private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) menuBar = new JMeterMenuBar(); setJMenuBar(menuBar); JPanel all = new JPanel(new BorderLayout()); all.add(createToolBar(), BorderLayout.NORTH); JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); treePanel = createTreePanel(); treeAndMain.setLeftComponent(treePanel); JSplitPane topAndDown = new JSplitPane(JSplitPane.VERTICAL_SPLIT); topAndDown.setOneTouchExpandable(true); topAndDown.setDividerLocation(0.8); topAndDown.setResizeWeight(.8); topAndDown.setContinuousLayout(true); topAndDown.setBorder(null); // see bug jdk 4131528 if (!DISPLAY_LOGGER_PANEL) { topAndDown.setDividerSize(0); } mainPanel = createMainPanel(); logPanel = createLoggerPanel(); errorsAndFatalsCounterLogTarget = new ErrorsAndFatalsCounterLogTarget(); LoggingManager.addLogTargetToRootLogger(new LogTarget[] { logPanel, errorsAndFatalsCounterLogTarget }); topAndDown.setTopComponent(mainPanel); topAndDown.setBottomComponent(logPanel); treeAndMain.setRightComponent(topAndDown); treeAndMain.setResizeWeight(.2); treeAndMain.setContinuousLayout(true); all.add(treeAndMain, BorderLayout.CENTER); getContentPane().add(all); tree.setSelectionRow(1); addWindowListener(new WindowHappenings()); // Building is complete, register as listener GuiPackage.getInstance().registerAsListener(); setTitle(DEFAULT_TITLE); setIconImage(JMeterUtils.getImage("icon-apache.png").getImage());// $NON-NLS-1$ setWindowTitle(); // define AWT WM_CLASS string }
From source file:org.apache.jmeter.protocol.http.visualizers.RequestViewHTTP.java
/** * Create a pane with three tables (request, params, headers) * /*w ww .j a v a2s . c o m*/ * @return Pane to display request data */ private Component createRequestPane() { // Set up the 1st table Result with empty headers tableRequest = new JTable(requestModel); JMeterUtils.applyHiDPI(tableRequest); tableRequest.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$ tableRequest.addMouseListener(new TextBoxDoubleClick(tableRequest)); setFirstColumnPreferredAndMaxWidth(tableRequest); RendererUtils.applyRenderers(tableRequest, RENDERERS_REQUEST); // Set up the 2nd table tableParams = new JTable(paramsModel); JMeterUtils.applyHiDPI(tableParams); tableParams.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$ tableParams.addMouseListener(new TextBoxDoubleClick(tableParams)); TableColumn column = tableParams.getColumnModel().getColumn(0); column.setPreferredWidth(160); tableParams.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer()); RendererUtils.applyRenderers(tableParams, RENDERERS_PARAMS); // Set up the 3rd table tableHeaders = new JTable(headersModel); JMeterUtils.applyHiDPI(tableHeaders); tableHeaders.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell")); // $NON-NLS-1$ tableHeaders.addMouseListener(new TextBoxDoubleClick(tableHeaders)); setFirstColumnPreferredAndMaxWidth(tableHeaders); tableHeaders.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer()); RendererUtils.applyRenderers(tableHeaders, RENDERERS_HEADERS); // Create the split pane JSplitPane topSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, GuiUtils.makeScrollPane(tableParams), GuiUtils.makeScrollPane(tableHeaders)); topSplit.setOneTouchExpandable(true); topSplit.setResizeWeight(0.50); // set split ratio topSplit.setBorder(null); // see bug jdk 4131528 JSplitPane paneParsed = new JSplitPane(JSplitPane.VERTICAL_SPLIT, GuiUtils.makeScrollPane(tableRequest), topSplit); paneParsed.setOneTouchExpandable(true); paneParsed.setResizeWeight(0.25); // set split ratio (only 5 lines to display) paneParsed.setBorder(null); // see bug jdk 4131528 // Hint to background color on bottom tabs (grey, not blue) JPanel panel = new JPanel(new BorderLayout()); panel.add(paneParsed); return panel; }
From source file:org.isatools.isacreatorconfigurator.configui.DataEntryPanel.java
private void createNavigationPanel() { JSplitPane tablesAndElements = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, createTableListPanel(), createFieldListPanel());/* w ww.j a v a 2s . c om*/ tablesAndElements.setBorder(null); customiseJSplitPaneLookAndFeel(tablesAndElements); add(tablesAndElements, BorderLayout.WEST); setCurrentPage(tableInfo); }
From source file:org.isatools.isacreatorconfigurator.configui.DataEntryPanel.java
private void customiseJSplitPaneLookAndFeel(JSplitPane splitPane) { BasicSplitPaneUI paneUI = new BasicSplitPaneUI() { @Override/*from www. j a v a 2 s .co m*/ public BasicSplitPaneDivider createDefaultDivider() { return new CustomSplitPaneDivider(this); } }; splitPane.setUI(paneUI); splitPane.setBackground(UIHelper.BG_COLOR); splitPane.setBorder(new EmptyBorder(1, 1, 10, 1)); }
From source file:org.lnicholls.galleon.gui.MainFrame.java
protected JComponent createContentPane() { JPanel panel = new JPanel(new BorderLayout()); mOptionsPanelManager = new OptionsPanelManager(this); mOptionsPanelManager.setMinimumSize(new Dimension(200, 100)); mOptionsPanelManager.setPreferredSize(new Dimension(400, 250)); InternalFrame navigator = new InternalFrame("Apps"); mAppTree = new AppTree(this, getAppsModel()); navigator.setContent(createScrollPane(mAppTree)); navigator.setSelected(true);//from www . j a v a 2 s.c o m navigator.setMinimumSize(new Dimension(100, 100)); navigator.setPreferredSize(new Dimension(150, 400)); JSplitPane mainSplitPane = createSplitPane(1, navigator, mOptionsPanelManager, 0.25D); mainSplitPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); panel.add(mainSplitPane, "Center"); JLabel statusField = new JLabel("Copyright \251 2005, 2006 Leon Nicholls"); statusField.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); JPanel statusPanel = new JPanel(new BorderLayout()); statusPanel.add(statusField, "West"); panel.add(statusPanel, "South"); panel.setPreferredSize(new Dimension(700, 450)); return panel; }
From source file:org.lnicholls.galleon.gui.MainFrame.java
public static JSplitPane createSplitPane(int orientation, Component comp1, Component comp2, double resizeWeight) { JSplitPane split = new JSplitPane(1, false, comp1, comp2); split.setBorder(new EmptyBorder(0, 0, 0, 0)); split.setOneTouchExpandable(false);//from w ww.j a va 2 s .c o m split.setResizeWeight(resizeWeight); return split; }
From source file:org.monkeys.gui.matcher.MatcherPanel.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*w ww. j a v a 2s. c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { javax.swing.JSplitPane splitPane = new javax.swing.JSplitPane(); textPanel = new javax.swing.JPanel(); textHeader = new org.monkeys.gui.HeaderLabel(); javax.swing.JScrollPane textScroll = new javax.swing.JScrollPane(); textArea = new javax.swing.JTextArea(); editPanel = new javax.swing.JPanel(); clearButton = new javax.swing.JButton(); javax.swing.JSeparator jSeparator2 = new javax.swing.JSeparator(); editButton = new javax.swing.JToggleButton(); matchingPanel = new javax.swing.JPanel(); org.monkeys.gui.HeaderLabel matchingHeader = new org.monkeys.gui.HeaderLabel(); matchingScroll = new javax.swing.JScrollPane(); matchingList = new org.monkeys.gui.matcher.MatcherTable(); org.monkeys.gui.HeaderLabel categoryLabel = new org.monkeys.gui.HeaderLabel(); categoryDropdown = new org.monkeys.gui.CategoryDropdown(); clipboardButton = new javax.swing.JToggleButton(); selectButton = new javax.swing.JToggleButton(); removeDuplicateButton = new javax.swing.JButton(); removeRowButton = new javax.swing.JButton(); javax.swing.JSeparator jSeparator3 = new javax.swing.JSeparator(); javax.swing.JSeparator jSeparator4 = new javax.swing.JSeparator(); javax.swing.JSeparator jSeparator5 = new javax.swing.JSeparator(); modifyButton = new javax.swing.JButton(); javax.swing.JSeparator jSeparator6 = new javax.swing.JSeparator(); undoButton = new javax.swing.JButton(); javax.swing.JSeparator jSeparator7 = new javax.swing.JSeparator(); clipboardDropdown = new javax.swing.JComboBox(); splitPane.setBorder(null); splitPane.setDividerSize(8); splitPane.setResizeWeight(0.6); textHeader.setText("Text"); textScroll.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray)); textScroll.setMinimumSize(new java.awt.Dimension(200, 50)); textScroll.setPreferredSize(new java.awt.Dimension(300, 150)); textArea.setTabSize(4); textArea.setAutoscrolls(false); textScroll.setViewportView(textArea); clearButton .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/clear-20.png"))); // NOI18N clearButton.setText("Clear"); clearButton.setToolTipText("Clear All Fields"); clearButton.setBorderPainted(false); clearButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearButtonActionPerformed(evt); } }); jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL); editButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/lock-18.png"))); // NOI18N editButton.setSelected(true); editButton.setText("Edit"); editButton.setToolTipText("Edit Text"); editButton.setBorderPainted(false); editButton.setDisabledIcon( new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/lock-18.png"))); // NOI18N editButton.setIconTextGap(3); editButton.setSelectedIcon( new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/unlock-18.png"))); // NOI18N editButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editButtonActionPerformed(evt); } }); javax.swing.GroupLayout editPanelLayout = new javax.swing.GroupLayout(editPanel); editPanel.setLayout(editPanelLayout); editPanelLayout.setHorizontalGroup(editPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(editPanelLayout.createSequentialGroup().addComponent(editButton).addGap(0, 0, 0) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(clearButton).addGap(0, 89, Short.MAX_VALUE))); editPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { clearButton, editButton }); editPanelLayout.setVerticalGroup(editPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(editPanelLayout.createSequentialGroup().addGap(0, 0, 0) .addGroup(editPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSeparator2) .addComponent(editButton, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(clearButton, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, 0))); editPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { clearButton, editButton }); javax.swing.GroupLayout textPanelLayout = new javax.swing.GroupLayout(textPanel); textPanel.setLayout(textPanelLayout); textPanelLayout.setHorizontalGroup(textPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(textPanelLayout.createSequentialGroup() .addComponent(editPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(textPanelLayout.createSequentialGroup().addContainerGap() .addGroup(textPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(textScroll, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(textHeader, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); textPanelLayout.setVerticalGroup(textPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(textPanelLayout.createSequentialGroup().addContainerGap() .addComponent(textHeader, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(editPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(textScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE) .addContainerGap())); splitPane.setLeftComponent(textPanel); matchingHeader.setText("Matches"); matchingScroll.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray)); matchingScroll.setMinimumSize(new java.awt.Dimension(200, 120)); matchingScroll.setPreferredSize(new java.awt.Dimension(480, 300)); matchingScroll.setViewportView(matchingList); categoryLabel.setText("Category"); clipboardButton.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/clipboard-16.png"))); // NOI18N clipboardButton.setToolTipText("Copy Selected To Clipboard"); clipboardButton.setBorderPainted(false); clipboardButton.setEnabled(false); clipboardButton.setIconTextGap(2); clipboardButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clipboardButtonActionPerformed(evt); } }); selectButton .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/list-16.png"))); // NOI18N selectButton.setToolTipText("Select / Unselect All"); selectButton.setBorderPainted(false); selectButton.setEnabled(false); selectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selectButtonActionPerformed(evt); } }); removeDuplicateButton.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/monkeys/gui/icons/remove-duplicates-16.png"))); // NOI18N removeDuplicateButton.setToolTipText("Remove Duplicates"); removeDuplicateButton.setBorderPainted(false); removeDuplicateButton.setEnabled(false); removeDuplicateButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { removeDuplicateButtonActionPerformed(evt); } }); removeRowButton .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/remove-16.png"))); // NOI18N removeRowButton.setToolTipText("Remove Selected"); removeRowButton.setBorderPainted(false); removeRowButton.setEnabled(false); removeRowButton.setIconTextGap(2); removeRowButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { removeRowButtonActionPerformed(evt); } }); jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL); jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL); jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL); modifyButton .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/edit-16.png"))); // NOI18N modifyButton.setToolTipText("Edit Selected"); modifyButton.setBorderPainted(false); modifyButton.setEnabled(false); modifyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { modifyButtonActionPerformed(evt); } }); jSeparator6.setOrientation(javax.swing.SwingConstants.VERTICAL); undoButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/monkeys/gui/icons/undo-16.png"))); // NOI18N undoButton.setBorderPainted(false); undoButton.setEnabled(false); undoButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { undoButtonActionPerformed(evt); } }); jSeparator7.setOrientation(javax.swing.SwingConstants.VERTICAL); clipboardDropdown.setEditable(true); clipboardDropdown.setModel( new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); clipboardDropdown.setEnabled(false); javax.swing.GroupLayout matchingPanelLayout = new javax.swing.GroupLayout(matchingPanel); matchingPanel.setLayout(matchingPanelLayout); matchingPanelLayout.setHorizontalGroup(matchingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(matchingPanelLayout.createSequentialGroup().addContainerGap() .addGroup(matchingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(matchingPanelLayout.createSequentialGroup().addComponent(selectButton) .addGap(0, 0, 0) .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(removeDuplicateButton).addGap(0, 0, 0) .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(removeRowButton).addGap(0, 0, 0) .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(modifyButton).addGap(0, 0, 0) .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(undoButton).addGap(0, 0, 0) .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(clipboardDropdown, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(clipboardButton) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(matchingScroll, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(categoryLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(categoryDropdown, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(matchingHeader, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); matchingPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { clipboardButton, modifyButton, removeRowButton }); matchingPanelLayout.setVerticalGroup(matchingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(matchingPanelLayout.createSequentialGroup().addContainerGap() .addComponent(categoryLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(categoryDropdown, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(matchingHeader, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(matchingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(matchingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, matchingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(removeDuplicateButton).addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(matchingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(selectButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(removeRowButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(modifyButton) .addGroup(matchingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(clipboardButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(matchingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(undoButton).addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(jSeparator7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(clipboardDropdown, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(matchingScroll, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE) .addContainerGap())); matchingPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { clipboardButton, clipboardDropdown }); splitPane.setRightComponent(matchingPanel); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(splitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE) .addGap(0, 0, 0))); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(splitPane)); }