Freezing Swing GUI...

Hi!
I am having problems with my swing GUI. It's freezing when I'm trying to disable a JButton in it. Could anybody tell me y it happens and what can be done to remedy it?
My piece of code:
stopButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// stop!
simulator.blinker = null;
label.setText("Stopped!");
playPauseButton.setEnabled(false);
stepButton.setEnabled(false);
showNamesButton.setEnabled(false);
speedUpButton.setEnabled(false);
speedDownButton.setEnabled(false);
stopButton.setEnabled(false);
When I press the stopButton, my GUI freezes. Same happens with this piece of code when simSpeed = 50:
speedUpButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (simulator.simSpeed > 300 && simulator.simSpeed <= 500){
simulator.simSpeed -= 100;
System.out.println("sim speed = " + simulator.simSpeed);
else if (simulator.simSpeed > 50 && simulator.simSpeed <= 300){
simulator.simSpeed -= 50;
System.out.println("sim speed = " + simulator.simSpeed);
else {//if (simulator.simSpeed == 50){
System.out.println("caution: sim speed = " + simulator.simSpeed);
speedUpButton.setEnabled(false);
Strangely, this one does not make the GUI freeze when simSpeed = 1500:
speedDownButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (simulator.simSpeed < 1500){
simulator.simSpeed += 100;
System.out.println("sim speed = " + simulator.simSpeed);
else if (simulator.simSpeed == 1500)
speedDownButton.setEnabled(false);
I'd greatly apreciate any help!
Thx in advance!
Owrwe

I have gone thru some experimentations and come to this conclusion:
when i try to disable buttons at the extremity of a row of buttons, the GUI freezes!
for example:
buttonPanel.add(speedUpButton);
buttonPanel.add(speedDownButton);
buttonPanel.add(playPauseButton);
buttonPanel.add(stepButton);
buttonPanel.add(showNamesButton);
buttonPanel.add(stopButton);
this is the order of buttons in a layout (flow layout by default, isn't it?). The GUI freezes when I try to disable: speedUpButton and stopButton (from inside their ActionListener method).
Changing the layout to:
buttonPanel.add(speedDownButton);
buttonPanel.add(speedUpButton);
buttonPanel.add(playPauseButton);
buttonPanel.add(stepButton);
buttonPanel.add(showNamesButton);
buttonPanel.add(stopButton);
The GUI freezes when I try to disable: speedDownButton (as compared to speedUpButton from above) and stopButton (from inside their ActionListener method).
Changing the layout to:
buttonPanel.add(playPauseButton);
buttonPanel.add(speedDownButton);
buttonPanel.add(speedUpButton);
buttonPanel.add(stepButton);
buttonPanel.add(stopButton);
buttonPanel.add(showNamesButton);
The GUI freezes when I try to disable: all of them (from inside the stopButton ActionListener). The speedUpButton and speedDownButton are properly disabled when the limits are reached without freezing the GUI. If I disable all buttons (thru the stopButton when it's not at the extremity of the row) except one of them, the GUI doesn't freeze!
any suggestions?

Similar Messages

  • Need help with threading in Swing GUI !!!

    I've written an app that parses and writes
    files. I'm using a Swing GUI. The app
    could potenially be used to parse hundreds or even
    thousands of files. I've included a JProgressBar
    to monitor progress. The problem is when I parse
    a large number of files the GUI freezes and only
    updates the values of the progress bar when the
    parsing and writing process is finished.
    I assume I need to start the process in a seperate thread. But, I'm new to threads and I'm not sure
    whether to start the Progressbar code in a seperate
    thread or the parsing code. As a matter of fact I really
    don't have any idea how to go about this.
    I read that Swing requires repaints be done in the
    event dispatch thread. If I start the parsing in a seperate
    thread how do I update the progressbar from the other
    thread? I'm a thread neophyte.
    I need a cigarette.

    In other words do this:
    Inside event Thread:
    handle button action
    start thread
    return from action listener
    Inside worker Thread:
    lock interface
    loop
    perform action
    update progress bar
    unlock interface
    return from worker ThreadDoesn't updating the progress bar (and locking/unlocking the interface components) from within the worker thread violate the rule that you shouldn't mess with Swing components outside the event thread? (Do I have that rule right?)
    In any case, is there any way to just post some kind of event to the progress bar to update it from within the worker thread, thereby insuring that the GUI progress bar update is being invoked from the event thread? This would also obviate the need to use a timer to poll for an update, which I think is a waste especially when the monitored progress is at a variable rate, (or for number crunching, is executing on different speed machines).
    Also, doesn't using invokeLater() or invokeAndWait() still block the event dispatching thread? I don't understand how having a chunk of code started in the event thread doesn't block the event thread unless the code's executed in a "sub-thread", which would then make it not in the event thread.
    I'm also looking to have a progress bar updated to monitor a worker thread, but also want to include a "Stop" button, etc. and need the event queue not to be blocked.
    The last thing I can think of is to implement some kind of original event-listener class that listens to events that I define, then register it with the system event queue somehow, then have the worker thread post events to this listener which then calls setValue() in the progress bar to insure that the bar is updated from the event queue and when I want it to be updated. I don't know yet if it's possible to create and register these kinds of classes (I'm guessing it is).
    Thanks,
    Derek

  • Thread execution causes Swing GUI to become unpresponsive

    Hello, I'm trying to refresh my memory of multithreaded Swing applications and have run into a wall. I have my main class, SimpleGUI, which creates the GUI interface and instantiates SimplePB and starts the SimplePB thread. The problem is that the SimpleGUI main class, which has a button to start the SimplePB thread so that a progress bar is updated, will result in a unresponsive GUI when the button is clicked. The button action code follows:
    public void actionPerformed(ActionEvent ae)
              System.out.println("Got action! "+ae);
              if(ae.getActionCommand().equals("Start")) {
              jb.setEnabled(false);
              spbt.run();
         }Do I need to do the Swing interface in a multithreaded manner as well? If so, how? If not, what am I doing wrong? Any pointers are greatly appreciated, thanks.

    sbpt.run();sbpt.start();
    At the moment you're not doing 'thread execution' at all, you are just running its code inline in the AWT thread, which freezes the GUI, which is why you needed the thread in the first place.

  • Loading large files in Java Swing GUI

    Hello Everyone!
    I am trying to load large files(more then 70 MB of xml text) in a Java Swing GUI. I tried several approaches,
    1)Byte based loading whith a loop similar to
    pane.setText("");
                 InputStream file_reader = new BufferedInputStream(new FileInputStream
                           (file));
                 int BUFFER_SIZE = 4096;
                 byte[] buffer = new byte[BUFFER_SIZE];
                 int bytesRead;
                 String line;
                 while ((bytesRead = file_reader.read(buffer, 0, BUFFER_SIZE)) != -1)
                      line = new String(buffer, 0, bytesRead);
                      pane.append(line);
                 }But this is gives me unacceptable response times for large files and runs out of Java Heap memory.
    2) I read in several places that I could load only small chunks of the file at a time and when the user scrolls upwards or downwards the next/previous chunk is loaded , to achieve this I am guessing extensive manipulation for the ScrollBar in the JScrollPane will be needed or adding an external JScrollBar perhaps? Can anyone provide sample code for that approach? (Putting in mind that I am writting code for an editor so I will be needing to interact via clicks and mouse wheel roatation and keyboard buttons and so on...)
    If anyone can help me, post sample code or point me to useful links that deal with this issue or with writting code for editors in general I would be very grateful.
    Thank you in advance.

    Hi,
    I'm replying to your question from another thread.
    To handle large files I used the new IO libary. I'm trying to remember off the top of my head but the classes involved were the RandomAccessFile, FileChannel and MappedByteBuffer. The MappedByteBuffer was the best way for me to read and write to the file.
    When opening the file I had to scan through the contents of the file using a swing worker thread and progress monitor. Whilst doing this I indexed the file into managable chunks. I also created a cache to further optimise file access.
    In all it worked really well and I was suprised by the performance of the new IO libraries. I remember loading 1GB files and whilst having to wait a few seconds to perform the indexing you wouldn't know that the data for the JList was being retrieved from a file whilst the application was running.
    Good Luck,
    Martin.

  • Running a Java application from a Swing GUI

    Hi,
    I was wondering if there is a simple way to run a Java application from a GUI built with Swing. I would presume there would be, because the Swing GUI is a Java application itself, technically.
    So, I want a user to click a button on my GUI, and then have another Java application, which is in the same package with the same classpaths and stuff, run.
    Is there a simple way to do this? Do any tutorials exist on this? If someone could give me any advice, or even a simple "yes this is possible, and it is simple" or "this is possible, but difficult" or "no this is not possible" answer, I would appreciate it. If anyone needs more information, I'll be happy to provide it.
    Thanks,
    Dan

    I don't know if it is possible to run the main method from another Java app by simply calling it...
    But you could just copy and paste the stuff from your main method into a new static method called something like runDBQuery and have all the execution run from there.
    How does that sound? Is it possible?
    What I'm suggeting is:
    Original
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void main(String[] args){
    // Your method calls
    //Your initializing
    doQuery();
    }Revised:
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void doMyQuery(){
    // Your method calls
    //Your initializing
    doQuery();
    // No main needed!!
    //public static void main(String[] args){
    // Your method calls
    //doQuery();
    //}

  • (Youtube-) Video in a Swing GUI

    Hey everyone,
    I'm currently trying to play a video in my Swing GUI with JMF but I really can't get it to work.
    With the help of google I got this far:
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.media.CannotRealizeException;
    import javax.media.Manager;
    import javax.media.NoPlayerException;
    import javax.media.Player;
    import javax.swing.JFrame;
    public class MediaPanel extends JFrame {
        public MediaPanel() {
            setLayout(new BorderLayout()); // use a BorderLayout
            // Use lightweight components for Swing compatibility
            Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, true);
            URL mediaURL = null;
            try {
                mediaURL = new URL("http://www.youtube.com/watch?v=Q7_Z_mQUBa8");
            } catch (MalformedURLException ex) {
                System.err.println(ex);
            try {
                // create a player to play the media specified in the URL
                Player mediaPlayer = Manager.createRealizedPlayer(mediaURL);
                // get the components for the video and the playback controls
                Component video = mediaPlayer.getVisualComponent();
                Component controls = mediaPlayer.getControlPanelComponent();
                if (video != null) {
                    add(video, BorderLayout.CENTER); // add video component
                if (controls != null) {
                    add(controls, BorderLayout.SOUTH); // add controls
                mediaPlayer.start(); // start playing the media clip
            } // end try
            catch (NoPlayerException noPlayerException) {
                System.err.println("No media player found");
            } // end catch
            catch (CannotRealizeException cannotRealizeException) {
                System.err.println("Could not realize media player");
            } // end catch
            catch (IOException iOException) {
                System.err.println("Error reading from the source");
            } // end catch
        } // end MediaPanel constructor
    }But all I get is errors:
    Warning: The URL may not exist. Please check URL
    No media player found
    Can you please please help me get this working? I would really appreciate a little walkthrough
    Best regards,
    Patrick
    Edited by: 954807 on Aug 24, 2012 6:52 AM

    Just use \ tags. People don't like to go to external sites.
    I really advise you to consider using JavaFX 2 here. Swing is old and not really supported anymore, JMF is also old and absolutely not supported anymore.                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Help on right mouse click in swing GUI.

    I am working on a swing GUI interface which has Panels. One Panel contains two sub panels. I want to add the Right Mouse click feature to the panels. How should i go about achieving this? Please provide sample example if any.
    Thanks in advance.

    anyPanel.addMouseListener(new MouseAdapter(){
       public void mouseReleased(MouseEvent e){
          if(e.isPopupTrigger()){
              // right clicked
    });

  • In this case, can I modify swing GUI out of swing thread?

    I know the Swing single thread rule and design (Swing is not thread safe).
    For time-consuming task, we are using other thread to do the task and
    we use SwingUtilities.invokeAndWait() or SwingUtilities.invokeLater (or SwingWorker) to update Swing GUI.
    My problem is, my time-consuming task is related to Swing GUI stuff
    (like set expanded state of a huge tree, walk through entire tree... etc), not the classic DB task.
    So my time-consuming Swing task must executed on Swing thread, but it will block the GUI responsivity.
    I solve this problem by show up a modal waiting dialog to ask user to wait and
    also allow user to cancel the task.
    Then I create an other thread (no event-dispatch thread) to do my Swing time-consuming tasks.
    Since the modal dialog (do nothing just allow user to cancel) is a thread spawn by
    Swing event-dispatch thread and block the Swing dispatch-thread until dialog close.
    So my thread can modify Swing GUI stuff safely since there are no any concurrent access problem.
    In this case, I broke the Swing's suggestion, modify Swing stuff out of Swing event-dispatch thread.
    But as I said, there are no concurrent access, so I am safe.
    Am I right? Are you agree? Do you have other better idea?
    Thanks for your help.

    If you drag your modal dialog around in front of the background UI, then there is concurrent access: paint requests in your main window as the foreground window moves around.

  • How to display multiple tables from database using netbeans swing gui

    plz reply asap on how to display multiple tables from database using netbeans swing gui into the same project

    Layered Pane with JTables or you can easily to it with a little scripting and HTML.
    plzzzzzzzzzzzzzzzzz, do not use SMS speak when posting.

  • Spreadsheets and SWING GUI's

    I have to embed a spreadsheet facility in a SWING GUI, what is the best and easiest way to do this ??

    I am not quite sure what your problem is.
    The way I see it, your question is one of the following:
    1. How do I (generally) make a user interface on top of my dos-based program?
    2. How do I make user interfaces in swing?
    If your question is the first, I'm afraid I can't tell you either. Would seem pretty obvious to me, make a simple dialog based app, using menu's or actions to trigger tha actions that were formerly triggered by numbers, etc...
    In the other case, I recommend the java swing tutorial at http://java.sun.com/docs/books/tutorial/uiswing/
    Greetings,
    Gert

  • Creating Undo Menu on Swing GUI

    Undo Menu is to be Created on Swing GUI on the Graphics. In the Tutorial, Undo with Text is given. But on implementing the logic of Undo with Text , some Errors come.

    You can use javax.swing.undo.* stuff only with classes implementing
    javax.swing.text.Document interface.
    To add undo/redo functionality for some Graphic components you should program this mechanism by yourself.
    So create your own object model, track all changes and implement/add appropriate listeners.

  • Need to run swing GUIs under different JRE versions

    I need to run swing GUIs under different JRE versions. Where can I find information about how to use only classes which exist from version 1.1.7 and above?

    Under 1.1.7, Swing (then version 1.0) was under com.sun.java.swing. The package name changed in Swing 1.1 b3/JDK 1.2 to javax.swing. You can see what classes were available under Swing 1.0 at http://java.sun.com/products/jfc/swingdoc-api-1.0.3/frame.html

  • Learning swing gui by hand or gui builder?

    Hello,
    Which is a better way of start learning writing swing gui based apps? by hand or using gui builder?
    Do you know any useful web links? or do you consider buying books?
    Thanks.

    >>
    Hmm, the differences:
    1) The GUI builder app resizes correctly.-->>falseJust stating it is false doesn't make it so. I never have any issues with my GUI builder apps resizing correctly. I do have issues making my coded by hand apps resize correctly. Ignorance on my part? Possibly
    I used to use a GUI builder just for complicated layouts and use GridBagLayout for simple dialogs inside an app, but I find myself just using a GUI builder now. Just much quicker and much less hassle.
    As far as maintaining the code if you use the GUI builder for maintanence where is the issue?
    i have never seen a GUI builer that uses
    layoutmangers please point me to the one that you are
    using i would love to take a look
    secondly have you seen tried the little exersise you
    will be suprised at how complex the code is compared
    to the one done by hand!!!!IntelliJ's GUI builder appears to use a custom GridLayout manager, the code it generates appears pretty straightforward to me, doesn't seem overly complicated:
    private void $$$setupUI$$$() {
            mainPanel = new JPanel();
            mainPanel.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
            final JSplitPane splitPane1 = new JSplitPane();
            splitPane1.setContinuousLayout(true);
            splitPane1.setDividerLocation(142);
            mainPanel.add(splitPane1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null));
            fileListing = new JTree();
            splitPane1.setLeftComponent(fileListing);
            tabPane = new JTabbedPane();
            splitPane1.setRightComponent(tabPane);
            renameTab = new JPanel();
            renameTab.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(2, 7, new Insets(0, 0, 0, 0), -1, -1));
            tabPane.addTab("Untitled", renameTab);
            final JLabel label1 = new JLabel();
            label1.setHorizontalAlignment(4);
            label1.setText("Current Filename");
            renameTab.add(label1, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null));
            imageScrollPane = new JScrollPane();
            imageScrollPane.setHorizontalScrollBarPolicy(30);
            imageScrollPane.setVerticalScrollBarPolicy(20);
            renameTab.add(imageScrollPane, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 7, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null));
            currentFilenameField = new JTextField();
            renameTab.add(currentFilenameField, new com.intellij.uiDesigner.core.GridConstraints(1, 1, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null));
            final JLabel label2 = new JLabel();
            label2.setText("New Filename");
            renameTab.add(label2, new com.intellij.uiDesigner.core.GridConstraints(1, 2, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null));
            newFilenameField = new JTextField();
            renameTab.add(newFilenameField, new com.intellij.uiDesigner.core.GridConstraints(1, 3, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null));
            renameButton = new JButton();
            renameButton.setText("Rename");
            renameTab.add(renameButton, new com.intellij.uiDesigner.core.GridConstraints(1, 4, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null));
            previousButton = new JButton();
            previousButton.setText("");
            renameTab.add(previousButton, new com.intellij.uiDesigner.core.GridConstraints(1, 5, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null));
            nextImageButton = new JButton();
            nextImageButton.setText("");
            renameTab.add(nextImageButton, new com.intellij.uiDesigner.core.GridConstraints(1, 6, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null));
            htmlGeneratorTab = new JPanel();
            tabPane.addTab("Untitled", htmlGeneratorTab);
        }

  • Swing GUI for Javadoc

    Hi everyone,
    I'm trying to learn some basic IO and Swing. My project is to make a Swing GUI for javadoc. It's supposed to run at least under W2K and XP.
    The Swing part is going fine, but I can't seem to get IO-part working.
    I tried working with the Runtime- and the Process-class, but I don't can't seem to execute javadoc or read any command-line output. Here's a sample of code that compiles ok, but doesn't do anything.
    try {
    Process p = Runtime.getRuntime().exec("javadoc");
    InputStream in = p.getInputStream();
    String s = in.toString();
    System.out.println(s);
    System.out.println();
    System.out.println(process.waitFor());
    System.out.println();
    System.out.println(process.exitValue());
    System.out.println();
    System.out.println(""+process);
    } catch (Exception e) {
    System.out.println("error");
    if anyone has any tips, suggestions or simple code samples, I would be very happy to hear from you.

    Alright, I figured out how to read the inputstream, but
    I still get an error:
    Windows 2000
    start
    <ERROR>
    javadoc: No packages or classes specified.
    and the program doesn't terminate for some reason.
    here's the new sourcecode:
    import java.io.*;
    public class JavaDocCommander {
         public static void main(String[] args) {
              System.out.println(System.getProperty("os.name"));
              System.out.println("start");
              new Test();
              System.out.println("slut");
    class Test{
         public Test(){
              try {           
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("javadoc");
    InputStream stderr = proc.getErrorStream();
    InputStreamReader isr = new InputStreamReader(stderr);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    System.out.println("<ERROR>");
    while ( (line = br.readLine()) != null)
    System.out.println(line);
    System.out.println("</ERROR>");
    int exitVal = proc.waitFor();
    System.out.println("Process exitValue: " + exitVal);
    } catch (Throwable t)
    t.printStackTrace();
              

  • Recommended Tool for devloping Swing GUI's?

    Hello everyone.
    I was wondering what a good tool kit was for building swing gui's?
    I heard NetBean was one, any others you recommend?
    Currently I use Rational Software Architect to do all my java coding but I don't see any options in this IDE for creating drag and drop GUI development.
    Thanks!

    You have 2 very different answers to consider. Before making your final decision, I'd ask yourself, which of the two responders is a Swing expert and which isn't. That should put a whole lot of added weight to one of the recs. Just my two scheckel's worth.

Maybe you are looking for

  • "Sent Items" folder can not be synced up in time for Outlook 2013 cache mode

    Hi, I found a strange problem in Outlook 2013 cache mode. Hope anyone can help me find out if it is the new design of outlook 2013 or outlook 2013 issue. I am using Exchange 2013 and Outlook 2013 client. I created two outlook profiles in two machines

  • Assemble PDF's located in Network folder

    Hi, I am trying to assemble PDF's which are located in a network folder.. <?xml version="1.0"?> <DDX xmlns="http://ns.adobe.com/DDX/1.0/">      <PDF result="PDFA.pdf">           <PDF source="\\w2msmossmgn02\SharedFolder\PID_APR_P111556.pdf"/>        

  • PL/SQL Oracle php AVG

    hi everyone :) im tryin to make AVG form salary(wynagrodzenie) but im doing something wrong , can someone correct me ??? it looks like this im trying to view avg salary(wynagrodzenie) from every departments(id_dzialu) , id_dzialu and wynagrodzenie ar

  • CFHTTP

    Okay I will describe our problem. We are running CF 6.1 and IIS 6 on server 2003. We have a service that people post to and get a response. In the script we have a CFHTTP call to a remote URL. If the CFHTTP takes longer than 18 seconds which can happ

  • RunTimeException Question

    Hi! I'm still learning java and I have a question that so far none of my friends was able to answer. If you to the hierarchy of java Throwable is like this: Object I Throwable I I Error Exception ... I ... RunTimeException Why RunTimeException is und