// Makes sure the log is visible. private static void displayLog() { if (!consoleDisplayed) { splitter.add(outputScroll); splitter.setDividerLocation(defaultSliderPosition); consoleDisplayed = true; } }
// Makes sure the log is visible. private static void displayLog() { println("Displayed", warning); if (!consoleDisplayed) { splitter.add(outputScroll); splitter.setDividerLocation(.8); consoleDisplayed = true; } }
public void actionPerformed(ActionEvent a) { String command = a.getActionCommand(); if (command.equals("e")) { // Log toggle. if (consoleDisplayed = !consoleDisplayed) { splitter.add(outputScroll); splitter.setDividerLocation(.8); } else { splitter.remove(outputScroll); } } else if (command.equals("k")) { if (text.getText().contains("class")) { // This means we should try to compile this as normal. // Pulls out class name String code = text.getText(); int firstPos = code.indexOf("class"); int secondPos = code.indexOf("{"); String name = code.substring(firstPos + "class".length() + 1, secondPos).trim(); compileAndRun(name, text.getText()); } else { // This means we should compile this as a playground. String code = text.getText(); // Common import statements built-in String importDump = new String(); importDump += ("import java.util.*;\n" + "import javax.swing.*;\n" + "import javax.swing.event.*;\n" + "import java.awt.*;\n" + "import java.awt.event.*;\n" + "import java.io.*;\n"); // Pulls out any "import" statements and appends them to the import dump. int i = code.indexOf("import"); while (i >= 0) { String s = code.substring(i, code.indexOf(";", i) + 1); code = code.replaceFirst(s, ""); importDump += s + "\n"; i = code.indexOf("import", i + 1); } // Inject the class header and main method code = "//User and auto-imports pre-defined\n" + importDump + "//Autogenerated class\npublic class Main {\npublic static void main(String[] args) {\n" + code + "\n}\n}"; compileAndRun("Main", code); } } }
public FigurePanel() { setLayout(new BorderLayout()); JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.add(fs); panel.add(bp); JSplitPane sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT, panel, cp); sp.setPreferredSize(new Dimension(500, 400)); sp.setDividerLocation(250); add(BorderLayout.CENTER, sp); }
// Many of the following methods have been added purely // so InternalFunctions can work. Originally, the code in // that class was inline here, so its functions had direct // access. I removed it so that students do not need to wade // through all the functions! But, that leaves the question as // to what to do with the following methods, but I don't think // there's much you can do ... public void changeSize(int width, int height) { setSize(width, height); Component top = splitPane.getTopComponent(); Component bottom = splitPane.getBottomComponent(); int totalHeight = top.getHeight() + bottom.getHeight(); int topHeight = (totalHeight * topProportion) / 100; int bottomHeight = (totalHeight * bottomProportion) / 100; top.setPreferredSize(new Dimension(width - 10, topHeight)); bottom.setPreferredSize(new Dimension(width - 10, bottomHeight)); splitPane.resetToPreferredSizes(); pack(); }
public UserDirectoryDialog(int nBuild) { super("View Directories"); initBlink(); try { // UIManager.setLookAndFeel( "javax.swing.plaf.metal.MetalLookAndFeel" ); } catch (Exception exc) { System.out.println("Error loading L&F: " + exc); } AppIF appIf = Util.getAppIF(); if (appIf instanceof VAdminIF) m_adminIF = (VAdminIF) appIf; if (nBuild == BUILD_ALL) { JPanel left = new JPanel(); left.setOpaque(true); left.setLayout(new BorderLayout()); left.add(new ConstraintsPanel(), BorderLayout.CENTER); JPanel right = new JPanel(); right.setLayout(new BorderLayout()); right.setOpaque(true); // right.setBackground( Color.white ); JTreeTableAdmin treeTable = new JTreeTableAdmin(new FileSystemModelAdmin()); right.add(new JScrollPane(treeTable), BorderLayout.CENTER); JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left, right); pane.setContinuousLayout(true); pane.setOneTouchExpandable(true); getContentPane().add(pane, BorderLayout.CENTER); } m_mlTxf = new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (timer != null) timer.cancel(); if (e.getSource() instanceof JTextField) { JTextField txf2 = (JTextField) e.getSource(); String strTxt = txf2.getText(); if (strTxt != null && strTxt.equals(INFOSTR)) txf2.setText(""); } } }; }
public InterpreterFrame() { super("Simple Lisp Interpreter"); // Create the menu menubar = buildMenuBar(); setJMenuBar(menubar); // Create the toolbar toolbar = buildToolBar(); // disable cut and copy actions cutAction.setEnabled(false); copyAction.setEnabled(false); // Setup text area for editing source code // and setup document listener so interpreter // is notified when current file modified and // when the cursor is moved. textView = buildEditor(); textView.getDocument().addDocumentListener(this); textView.addCaretListener(this); // set default key bindings bindKeyToCommand("ctrl C", "(buffer-copy)"); bindKeyToCommand("ctrl X", "(buffer-cut)"); bindKeyToCommand("ctrl V", "(buffer-paste)"); bindKeyToCommand("ctrl E", "(buffer-eval)"); bindKeyToCommand("ctrl O", "(file-open)"); bindKeyToCommand("ctrl S", "(file-save)"); bindKeyToCommand("ctrl Q", "(exit)"); // Give text view scrolling capability Border border = BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(3, 3, 3, 3), BorderFactory.createLineBorder(Color.gray)); JScrollPane topSplit = addScrollers(textView); topSplit.setBorder(border); // Create tabbed pane for console/problems consoleView = makeConsoleArea(10, 50, true); problemsView = makeConsoleArea(10, 50, false); tabbedPane = buildProblemsConsole(); // Plug the editor and problems/console together // using a split pane. This allows one to change // their relative size using the split-bar in // between them. splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topSplit, tabbedPane); // Create status bar statusView = new JLabel(" Status"); lineNumberView = new JLabel("0:0"); statusbar = buildStatusBar(); // Now, create the outer panel which holds // everything together outerpanel = new JPanel(); outerpanel.setLayout(new BorderLayout()); outerpanel.add(toolbar, BorderLayout.PAGE_START); outerpanel.add(splitPane, BorderLayout.CENTER); outerpanel.add(statusbar, BorderLayout.SOUTH); getContentPane().add(outerpanel); // tell frame to fire a WindowsListener event // but not to close when "x" button clicked. setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); addWindowListener(this); // set minimised icon to use setIconImage(makeImageIcon("spi.png").getImage()); // setup additional internal functions InternalFunctions.setup_internals(interpreter, this); // set default window size Component top = splitPane.getTopComponent(); Component bottom = splitPane.getBottomComponent(); top.setPreferredSize(new Dimension(100, 400)); bottom.setPreferredSize(new Dimension(100, 200)); pack(); // load + run user configuration file (if there is one) String homedir = System.getProperty("user.home"); try { interpreter.load(homedir + "/.simplelisp"); } catch (FileNotFoundException e) { // do nothing if file does not exist! System.out.println("Didn't find \"" + homedir + "/.simplelisp\""); } textView.grabFocus(); setVisible(true); // redirect all I/O to problems/console redirectIO(); // start highlighter thread highlighter = new DisplayThread(250); highlighter.setDaemon(true); highlighter.start(); }
public static void main() { // Main frame = new JFrame("Java Playground"); frame.setSize(640, 480); // Make sure the divider is properly resized frame.addComponentListener( new ComponentAdapter() { public void componentResized(ComponentEvent c) { splitter.setDividerLocation(.8); } }); // Make sure the JVM is reset on close frame.addWindowListener( new WindowAdapter() { public void windowClosed(WindowEvent w) { new FrameAction().kill(); } }); // Setting up the keybinding // Ctrl+k or Cmd+k -> compile bind(KeyEvent.VK_K); // Ctrl+e or Cmd+e -> console bind(KeyEvent.VK_E); // Save, New file, Open file, Print. // Currently UNUSED until I figure out how normal java files and playground files will // interface. bind(KeyEvent.VK_S); bind(KeyEvent.VK_N); bind(KeyEvent.VK_O); bind(KeyEvent.VK_P); // Binds the keys to the action defined in the FrameAction class. frame.getRootPane().getActionMap().put("console", new FrameAction()); // The main panel for typing code in. text = new JTextPane(); textScroll = new JScrollPane(text); textScroll.setBorder(null); textScroll.setPreferredSize(new Dimension(640, 480)); // Document with syntax highlighting. Currently unfinished. doc = text.getStyledDocument(); doc.addDocumentListener( new DocumentListener() { public void changedUpdate(DocumentEvent d) {} public void insertUpdate(DocumentEvent d) {} public void removeUpdate(DocumentEvent d) {} }); ((AbstractDocument) doc).setDocumentFilter(new NewLineFilter()); // The output log; a combination compiler warning/error/runtime error/output log. outputText = new JTextPane(); outputScroll = new JScrollPane(outputText); outputScroll.setBorder(null); // "Constant" for the error font error = new SimpleAttributeSet(); error.addAttribute(StyleConstants.CharacterConstants.Italic, Boolean.TRUE); error.addAttribute(StyleConstants.Foreground, Color.RED); // "Constant" for the warning message font warning = new SimpleAttributeSet(); warning.addAttribute(StyleConstants.CharacterConstants.Italic, Boolean.TRUE); warning.addAttribute(StyleConstants.Foreground, Color.PINK); // "Constant" for the debugger error font progErr = new SimpleAttributeSet(); progErr.addAttribute(StyleConstants.Foreground, Color.BLUE); // Print streams to redirect System.out and System.err. out = new TextOutputStream(outputText, null); err = new TextOutputStream(outputText, error); System.setOut(new PrintStream(out)); System.setErr(new PrintStream(err)); // Sets up the output log outputText.setEditable(false); outputScroll.setVisible(true); // File input/output setup chooser = new JFileChooser(); // Setting up miscellaneous stuff compiler = ToolProvider.getSystemJavaCompiler(); JVMrunning = false; redirectErr = null; redirectOut = null; redirectIn = null; // Sets up the splitter pane and opens the program up splitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT, textScroll, outputScroll); consoleDisplayed = false; splitter.remove(outputScroll); // Initially hides terminal until it is needed splitter.setOneTouchExpandable(true); frame.add(splitter); frame.setVisible(true); // Sets the divider to the proper one, for debugging // splitter.setDividerLocation(.8); }
public void actionPerformed(ActionEvent a) { // Note that this only works on *nix OSes. // For windows, get the first character of the action command, cast it to int, and compare // that on a case-by-case basis. String command = a.getActionCommand(); if (command.equals("e")) { // Log toggle. if (consoleDisplayed = !consoleDisplayed) { splitter.add(outputScroll); splitter.setDividerLocation(defaultSliderPosition); } else { splitter.remove(outputScroll); } } else if (command.equals("r")) { // Gets the code into a string. String code = text.getText(); // Marks certain areas as "dirty". // Dirty areas are places that shouldn't be considered for any keywords, // including "import", "extend", and so on. ArrayList<Integer> dirtyBounds = getDirty(code); if (text.getText().contains("class")) { // This means we should try to compile this as normal. // Pulls out class name int firstPos = code.indexOf("public class"); int secondPos = code.indexOf("{"); String name = code.substring(firstPos + "public class".length() + 1, secondPos).trim(); // Just a safety check to make sure you don't try to modify this program while it's // running. if (name.equals("Playground")) { System.out.println( "I know what you're doing and I don't approve. I won't even compile that."); return; } compileAndRun(name, code); } else { // This means we should compile this as a playground. // Common import statements built-in String importDump = new String(); importDump += ( // "import java.util.*;\n" + "import javax.swing.*;\n" + "import javax.swing.event.*;\n" + "import java.awt.*;\n" + "import java.awt.event.*;\n" + "import java.io.*;\n"); // User-defined or auto-generated methods String methodDump = new String(); // dirtyBounds.forEach(System.out::println); // Pulls out any "import" statements and appends them to the import dump. int i = code.indexOf("import"); while (i >= 0) { // Ignores comments and string literals if (isDirty(dirtyBounds, i)) { i = code.indexOf("import", i + 1); continue; } String s = code.substring(i, code.indexOf(";", i) + 1); // System.out.println("Found import: " + s); code = code.replaceFirst(s, ""); importDump += s + "\n"; i = code.indexOf("import", i + 1); } // Pulls out methods- these are defined by the keyword "method" until a closing bracket. /* i = code.indexOf("method"); while(i >= 0) { //Ignores comments and string literals if (isDirty(dirtyBounds, i)) { i = code.indexOf("method", i+1); continue; } //This scans from the first '{' until the last '}' to pull out the full method declaration. char temp = 0; int pos = code.indexOf("{", i+1), count = 1; if(pos != -1) { while(++pos < code.length()) { if (count == 0) break; temp = code.charAt(pos); if (temp == '{') count++; if (temp == '}') count--; } } else { //Missing an opening bracket, so just remove "method" and hope it compiles. code = code.replaceFirst("method", ""); i = code.indexOf("method", i+1); continue; } String s = code.substring(i, pos); //System.out.println("Found method: " + s); code = code.replace(s, ""); methodDump+=(s.replaceFirst("method ", "static ")) + "\n"; i = code.indexOf("method", i+1); }*/ // Pulls out all methods i = code.indexOf("("); while (i >= 0) { if (isDirty(dirtyBounds, i)) { i = code.indexOf("(", i + 1); continue; } // Move backwards first char temp = 0; int pos = i; boolean shouldSkip = false; while (--pos > 0) { temp = code.charAt(pos); if (temp == '.') { shouldSkip = true; break; } // This is a method call, ie String.charAt(); if (temp == ';') { ++pos; break; } // This is most likely a method declaration, since we had no errors // If we hit the start of the file, that's probable a method dec. too! } if (shouldSkip || isDirty(dirtyBounds, pos)) { i = code.indexOf("(", i + 1); continue; } // If this def. isn't a method or it's in a comment int start = pos; temp = 0; pos = code.indexOf("{", i + 1); int count = 1; if (pos != -1) { while (++pos < code.length()) { if (count == 0) break; temp = code.charAt(pos); if (temp == '{') count++; if (temp == '}') count--; } } else { i = code.indexOf("(", i + 1); continue; } int end = pos; String s = code.substring(start, end); code = code.replace(s, ""); // Just to make it look nicer s = s.trim(); System.out.println("Found method: " + s); methodDump += (s + "\n"); i = code.indexOf("(", i + 1); } // Inject the class header and main method, imports, and methods code = "//User and auto-imports pre-defined\n" + importDump + "//Autogenerated class\n" + "public class Main {\n" + "public static void main(String[] args) {\n" + code + "}\n" + methodDump + "}"; // Run as normal compileAndRun("Main", code); } } else if (command.equals("k")) { kill(); } else if (command.equals("o")) { new OptionFrame(frame); } else if (command.equals("/")) { new HelpFrame(frame); } }
private void jbInit() throws Exception { border1 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(165, 163, 151)); border2 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(165, 163, 151)); border3 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(178, 178, 178)); titledBorder1 = new TitledBorder(border3, "Subject"); border4 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(178, 178, 178)); titledBorder2 = new TitledBorder(border4, "Message"); border5 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(178, 178, 178)); titledBorder3 = new TitledBorder(border5, "Subject"); border6 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(165, 163, 151)); titledBorder4 = new TitledBorder(border6, "Message"); border7 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(165, 163, 151)); titledBorder5 = new TitledBorder(border7, "Messages"); border8 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(165, 163, 151)); titledBorder6 = new TitledBorder(border8, "Online Users"); border9 = new EtchedBorder(EtchedBorder.RAISED, Color.white, new Color(178, 178, 178)); titledBorder7 = new TitledBorder(border9, "Send Message"); this.getContentPane().setLayout(borderLayout1); jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT); jSplitPane1.setBorder(border1); jSplitPane1.setLastDividerLocation(250); jSplitPane1.setResizeWeight(1.0); jLabelServer.setRequestFocusEnabled(true); jLabelServer.setText("Server"); jLabelUserId.setText("User Id"); jTextFieldServer.setPreferredSize(new Dimension(75, 20)); jTextFieldServer.setText(""); jTextFieldUser.setPreferredSize(new Dimension(75, 20)); jTextFieldUser.setText(""); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setJMenuBar(jMenuBarMain); this.setTitle("Message Client"); jLabeltargetUser.setText("Target"); jTextFieldTargetUser.setPreferredSize(new Dimension(75, 20)); jTextFieldTargetUser.setText(""); jPanelSendMessages.setBorder(border2); jPanelSendMessages.setMaximumSize(new Dimension(32767, 32767)); jPanelSendMessages.setOpaque(false); jPanelSendMessages.setPreferredSize(new Dimension(96, 107)); jPanelSendMessages.setRequestFocusEnabled(true); jPanelSendMessages.setToolTipText(""); jPanelSendMessages.setLayout(verticalFlowLayout1); jTextFieldSendSubject.setBorder(titledBorder3); jTextFieldSendSubject.setText(""); jTextFieldSendSubject.addKeyListener(new Client_jTextFieldSendSubject_keyAdapter(this)); jSplitPane2.setOrientation(JSplitPane.HORIZONTAL_SPLIT); jScrollPane1.setBorder(titledBorder5); jScrollPane2.setBorder(titledBorder6); jToggleButtonRegister.setText("Register"); jToggleButtonRegister.addActionListener(new Client_jToggleButtonRegister_actionAdapter(this)); jButtonMultiConnect.setText("Multi-Connect"); jButtonMultiConnect.addActionListener(new Client_jButtonMultiConnect_actionAdapter(this)); jListOnlineUsers.addMouseListener(new Client_jListOnlineUsers_mouseAdapter(this)); jToggleButtonConnect.setText("Connect"); jToggleButtonConnect.addActionListener(new Client_jToggleButtonConnect_actionAdapter(this)); jTextPaneDisplayMessages.setEditable(false); jTextPaneDisplayMessages.addMouseListener( new Client_jTextPaneDisplayMessages_mouseAdapter(this)); jTextFieldSendMessages.setBorder(titledBorder7); jTextFieldSendMessages.setToolTipText(""); jTextFieldSendMessages.addKeyListener(new Client_jTextFieldSendMessages_keyAdapter(this)); jButtonMessageStresser.setText("Msg Stresser"); jButtonMessageStresser.addActionListener( new Client_jToggleButtonMessageStresser_actionAdapter(this)); jMenuItemClearMessages.setText("Clear Messages"); jMenuItemClearMessages.addActionListener(new Client_jMenuItemClearMessages_actionAdapter(this)); jMenuServer.setText("Server"); jMenuItemServerConnect.setText("Connect"); jMenuItemServerConnect.addActionListener(new Client_jMenuItemServerConnect_actionAdapter(this)); jMenuItemServerDisconnect.setText("Disconnect"); jMenuItemServerDisconnect.addActionListener( new Client_jMenuItemServerDisconnect_actionAdapter(this)); jMenuOptions.setText("Options"); jMenuTest.setText("Test"); jMenuItemOptionsRegister.setText("Register"); jMenuItemOptionsRegister.addActionListener( new Client_jMenuItemOptionsRegister_actionAdapter(this)); jMenuItemOptionsDeregister.setText("Deregister"); jMenuItemOptionsDeregister.addActionListener( new Client_jMenuItemOptionsDeregister_actionAdapter(this)); jMenuItemOptionsEavesdrop.setText("Eavesdrop"); jMenuItemOptionsEavesdrop.addActionListener( new Client_jMenuItemOptionsEavesdrop_actionAdapter(this)); jMenuItemOptionsUneavesdrop.setText("Uneavesdrop"); jMenuItemOptionsUneavesdrop.addActionListener( new Client_jMenuItemOptionsUneavesdrop_actionAdapter(this)); jMenuItemTestMulticonnect.setText("Multiconnect"); jMenuItemTestMulticonnect.addActionListener( new Client_jMenuItemTestMulticonnect_actionAdapter(this)); jMenuItemTestMessageStresser.setText("Message Stresser"); jMenuItemTestMessageStresser.addActionListener( new Client_jMenuItemTestMessageStresser_actionAdapter(this)); jMenuItemTestMultidisconnect.setText("Multidisconnect"); jMenuItemTestMultidisconnect.addActionListener( new Client_jMenuItemTestMultidisconnect_actionAdapter(this)); jMenuItemOptionsGlobalEavesdrop.setText("Global Eavesdrop"); jMenuItemOptionsGlobalEavesdrop.addActionListener( new Client_jMenuItemOptionsGlobalEavesdrop_actionAdapter(this)); jMenuItemOptionsGlobalUneavesdrop.setEnabled(false); jMenuItemOptionsGlobalUneavesdrop.setText("Global Uneavesdrop"); jMenuItemOptionsGlobalUneavesdrop.addActionListener( new Client_jMenuItemOptionsGlobalUneavesdrop_actionAdapter(this)); jLabelPwd.setText("Pwd"); jPasswordFieldPwd.setMinimumSize(new Dimension(11, 20)); jPasswordFieldPwd.setPreferredSize(new Dimension(75, 20)); jPasswordFieldPwd.setText(""); jMenuItemScheduleCommand.setText("Schedule Command"); jMenuItemScheduleCommand.addActionListener( new Client_jMenuItemScheduleCommand_actionAdapter(this)); jMenuItemEditScheduledCommands.setText("Edit Scheduled Commands"); jMenuItemEditScheduledCommands.addActionListener( new Client_jMenuItemEditScheduledCommands_actionAdapter(this)); jPanelSendMessages.add(jTextFieldSendSubject, null); jPanelSendMessages.add(jTextFieldSendMessages, null); jSplitPane1.add(jSplitPane2, JSplitPane.TOP); jSplitPane2.add(jScrollPane1, JSplitPane.TOP); jScrollPane1.getViewport().add(jTextPaneDisplayMessages, null); jSplitPane2.add(jScrollPane2, JSplitPane.BOTTOM); jScrollPane2.getViewport().add(jListOnlineUsers, null); this.getContentPane().add(jSplitPane1, BorderLayout.CENTER); jSplitPane1.add(jPanelSendMessages, JSplitPane.BOTTOM); this.getContentPane().add(jPanel1, BorderLayout.NORTH); jPanel1.add(jLabelServer, null); jPanel1.add(jTextFieldServer, null); jPanel1.add(jLabelUserId, null); jPanel1.add(jTextFieldUser, null); jPanel1.add(jLabelPwd, null); jPanel1.add(jPasswordFieldPwd, null); jPanel1.add(jLabeltargetUser, null); jPanel1.add(jTextFieldTargetUser, null); jPanel1.add(jToggleButtonConnect, null); jPanel1.add(jToggleButtonRegister, null); jPanel1.add(jButtonMultiConnect, null); jPanel1.add(jButtonMessageStresser, null); jPopupMenuMessageArea.add(jMenuItemClearMessages); jMenuBarMain.add(jMenuServer); jMenuBarMain.add(jMenuOptions); jMenuBarMain.add(jMenuTest); jMenuServer.add(jMenuItemServerConnect); jMenuServer.add(jMenuItemServerDisconnect); jMenuOptions.add(jMenuItemOptionsRegister); jMenuOptions.add(jMenuItemOptionsDeregister); jMenuOptions.add(jMenuItemOptionsEavesdrop); jMenuOptions.add(jMenuItemOptionsUneavesdrop); jMenuOptions.add(jMenuItemOptionsGlobalEavesdrop); jMenuOptions.add(jMenuItemOptionsGlobalUneavesdrop); jMenuTest.add(jMenuItemTestMulticonnect); jMenuTest.add(jMenuItemTestMultidisconnect); jMenuTest.add(jMenuItemTestMessageStresser); jMenuTest.add(jMenuItemScheduleCommand); jMenuTest.add(jMenuItemEditScheduledCommands); jSplitPane1.setDividerLocation(200); jSplitPane2.setDividerLocation(600); jListOnlineUsers.setCellRenderer(new OnlineListCellRenderer()); jListOnlineUsers.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); jMenuItemTestMulticonnect.setEnabled(true); jMenuItemTestMultidisconnect.setEnabled(false); jMenuItemServerConnect.setEnabled(true); jMenuItemServerDisconnect.setEnabled(false); jMenuItemOptionsRegister.setEnabled(true); jMenuItemOptionsDeregister.setEnabled(false); }