JFrame Issue

Hello,
I have a code simple screen which has some text fields and a submit button. On Click of the button, all the fields that have been entered are stored in string variables and passed to a function in another class (after instantiating the class).
FIRST CLASS FILE:
public class myclass extends JPanel implements ActionListener{
JTextField kk;
JTextField qk;
JButton bk;
public myclass(){
kk = new JTextField(5);
qk = new JTextField(5);
button = new JButton();
button.addActionListener(this);
\\some more instantiations
public void BuildGUI(){
\\usual GUI frame.add and stuff
public void actionPerformed(ActionEvent ev){
     String kk1 = kk.getText();
     String qk1= qk.getText();
        AnotherClass ac = new AnotherClass();
        ac.sending(kk1, qk1);
public static void main(){
myclass mm = new myclass();
mm.BuildGUI();
}SECOND CLASS FILE:
public class AnotherClass(){
public void sending(String a, String b)
try{
int aint = Integer.parseInt(a);
double bdouble = Integer.parseDouble(b);
\\Creation of ServerSockets
while(true)
\\Accept connections from clients
\\Other code
}catch(Exception ex){ex.printStackTrace();}
}Problem: The GUI frame that was created in class one's main() does not close, no matter what. The button on it does appear disabled. My guess is it must be ending up in the infinite loop of server accepting connections. Can anyone please suggest a workaround to this problem, in the sense can some code alignment be changed to close the frame once parameters have been successfully passed to the next function?
Thanks,

ac.sending(kk1, qk1);Should be run in a separate thread otherwise your GUI would blocks.

Similar Messages

  • JMenu/JFrame issue

    Ok, I can't figure out how to make an option in a menu popup a new JFrame instead of displaying some stupid text in a text box.
    menuItem2 = new JMenuItem("Inventory");
              menuItem2.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_2, ActionEvent.ALT_MASK));
              menuItem2.getAccessibleContext().setAccessibleDescription("This does nothing for now");
              menu.add(menuItem2);That's just a tiny part...I need it to open the JFrame Inven if anybody knows how to do that.

    (post #2 - another disappeared into the ether)
    is this what you're trying to do?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      public Testing()
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLocation(400,200);
        setSize(300,200);
        JMenu menu = new JMenu("Window");
        JMenuItem menuItem1 = new JMenuItem("Employees");
        JMenuItem menuItem2 = new JMenuItem("Inventory");
        menu.add(menuItem1);
        menu.add(menuItem2);
        JMenuBar menuBar = new JMenuBar();
        menuBar.add(menu);
        setJMenuBar(menuBar);
        getContentPane().add(new JTextArea(5,20));
        menuItem1.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            JFrame frame = new JFrame("Employee Frame");
            frame.setSize(200,100);
            frame.setLocation(100,500);
            frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            frame.setVisible(true);}});
        menuItem2.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            JFrame frame = new JFrame("Inventory Frame");
            frame.setSize(200,100);
            frame.setLocation(500,500);
            frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            frame.setVisible(true);}});
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • JFrames issues repainting dialog windows

    I have an application with a JFrame as the main window. In this window are several components (buttons and a table). Clicking on the buttons opens various dialogs one of the buttons opens another JFrame (was/is a separate application). Everything works fine until this second JFrame is closed. After it is closed all the other dialog windows that now open are "unpainted" until you mouse over each component.
    What am I doing wrong?
    -Tad

    Well originally I was having problems with frame 1 repainting after closing frame2. I fixed that by passing a reference of frame one to frame 2 and when frame 2 closes I update(g) on frame 1 and that fixed the problem. But I'm not adding any of the components to other frames. I don't understand how closing the frame could cause problems repainting dialogs in the other frame especially ones that are called as the static JOptionPane.showMessageDialog(....). I mean everytime you call that shouldn't it be creating an entirely new "window"? why would it paint ok the first time? but not after opening closing another frame?

  • A JFrame issue?

    Hi all!
    I have a problem:
    In my program, i have an error-window, which i show when there is an error, however, the error often changes, so i will update the components on the window. However, when
    there no longer is an error, i need to close the window.
    One more thing, i need to check whether the window is being displayed, if it is already active, i just update the components, if its not active, i should create a new window.... I do this, so that i do not duplicate the error-window!
    I hope someone can assist me!
    Thanks
    Regards

    OK, that takes care of the error message.
    As posted elsewhere the frame itself provides methods for querying it's state (regarding visibility, etc).
    How often is there an error?
    If you need only one error-frame (it is opened quite often) you can keep it and always use dispose() and show() - then you need not find out whether the frame is currently open or not.

  • Multiple panels on one panel

    i have three panels-mainPanel, panel1, panel2. my mainPanel has a borderlayout. i am trying to set both panels1 and 2 onto the center of the mainpanel. i only want to show one panel at a time until a button is clicked. i have used the setVisible command but i still get a panel with nothing on. is there a way around this. the following is my code. is there a way so i can have both panels in the center with all the components for each panels.
    public class IssueBook extends JFrame{
    private JFrame IssueBook;
    JFrame mainFrame = this;
    private JPanel mainPanel, panel1, panel2;
    public IssueBook() {
    IssueBook = new JFrame("Issue Or Return Book");
    mainPanel = new JPanel();
    panel1 = new JPanel();
    panel2 = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    IssueBookPanel.setLayout(new FlowLayout());
    ReturnBookPanel.setLayout(new FlowLayout());
    mainPanel.add(IssueBookPanel, BorderLayout.CENTER);
    mainPanel.add(ReturnBookPanel, BorderLayout.CENTER);
    panel1.setVisible(true);
    panel2.setVisible(false);
    IssueBook.show( );
    }

    Layout managers and panels are one of those things that has to be studied, the good new is that for the most part it isn't difficult;-import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class TwoPanels extends JFrame implements ActionListener {
       JButton start = new JButton("Start");
       JButton submit1 = new JButton("<html><center><b>Add B<br>Remove A</center></html>");
       JButton submit2 = new JButton("<html><center><b>Add A<br>Remove B</center></html>");
       JPanel panel1, panel2, panel3, panel4;
       Container cont;
    public TwoPanels(){
       cont = getContentPane();
       cont.setLayout(new BorderLayout() );
       panel1 = new JPanel();
       panel1.setLayout(new FlowLayout());
       JLabel label1 = new JLabel("My application");
       panel1.add(label1);
       start.addActionListener(this);
       panel1.add(start);
       panel2 = new JPanel();
       panel2.setLayout(new FlowLayout());
       JLabel label = new JLabel("My starting panel");
       panel2.add(label);
       panel3 = new JPanel();
       panel3.setLayout(new FlowLayout());
       panel3.setBackground(Color.magenta);
       JLabel label2 = new JLabel("This is my pink panel, Panel A");
       label2.setForeground(Color.yellow);
       panel3.add(label2);
       submit1.addActionListener(this);
       panel3.add(submit1);
       panel4 = new JPanel();
       panel4.setLayout(new FlowLayout());
       panel4.setBackground(Color.blue);
       JLabel label3 = new JLabel("This is my placid panel, Panel B");
       label3.setForeground(Color.cyan);
       panel4.add(label3);
       submit2.addActionListener(this);
       panel4.add(submit2);
       cont.add("North", panel1);
       cont.add("Center", panel2);
       public void actionPerformed (ActionEvent e){
          if (e.getSource() == start){
             cont.remove(panel2);
             cont.add("Center", panel3);
             validate();
          if (e.getSource() == submit1){
             cont.remove(panel3);
             cont.add("Center", panel4);
             validate();
             repaint();
          if (e.getSource() == submit2){
             cont.remove(panel4);
             cont.add("Center", panel3);
             validate();
             repaint();
      public static void main(String[]args){
         TwoPanels m = new TwoPanels();
         m.setSize(240, 180);
         m.setLocation(150, 200);
         m.setDefaultCloseOperation( EXIT_ON_CLOSE );
         m.setVisible(true);
    }

  • Help request - JFrame re-use problem - Painting issues

    Hello,
    I'll give a short background on the problem:
    The general purpose of my program is to display a series/sequence of screens in a spesific order. I have constructed an object (JFrame) for each of those screens. In the beginning I create a Vector containing information about every screen in the sequence and when the time comes for that screen to appear I use that information to create the screen.
    In my first design I created a new object for each screen (I have 6 basic types of screens but they often appear with different data - graphs and tables and such) while after I was done with a screen I released the reference to it. For some reason the memory requirement of that design were immense and kept increasing with each new screen.
    To remedy that I switched to a re-usage (recycling sort of say) design. I created a cache of screens, 1-2 of each type depending on whether two screens of the same type may appear one after the other. When a screen appears for the first time, I use the constructor to initialize it and save it in the cache but for future usage I "re-initialize" the old screen with the new data. Only after I finished re-initializng the screen I set it's visibility to true.
    Coming to the problem at last: as I understand seeing as the update of the frame's contents finishes before the screen is displayed it should already be displayed in it's updated form, BUT instead it appears with the old data for a split second and then repaints on-the-fly. You can actually see some components disappearing/appearing. This is a pretty nasty visual effect that I cant figure out how to overcome but worst of all I dont understand WHY it happens...
    **Edit:* Please read P.S. 3, just to show, this is not because I have a slow computer (it's quite new and has plenty of RAM) and I gave the heap plenty of space so it's not an issue of increasing it with each allocation
    I kindly ask for any help/advice on why the problem happens and how to fix it.
    Thank you in advance.
    P.S. I tried to pipeline the updates, say screen 1 is currently displayed so when the button to move on to screen 2 is pressed, screen 3 is re/initialized and so on. I used a seperate thread but it was synchronized with the displaying method so it should've been just like sequential updates but only less time consuming. When that didn't work I did the sequential update (which I described above) which didn't work either.
    P.S. 2. I gave the background in case it might help and to show that an advice of the sort "don't re-use and just create a new object" is out of the question =\
    P.S. 3 Something very odd I nearly forgot to mention: I work in Eclipse, and when I run it there I don't encounter this problem, it runs smoothly and there are no such painting problems but when I run it externally from the command line, that's where these problems occur and that is how the program will eventually be used. I don't understand why there is a difference at all, after all the JVM is one and the same in both cases, no? =\
    Edited by: Puchino on Dec 24, 2007 10:06 PM
    Edited by: Puchino on Dec 24, 2007 10:12 PM

    First off, It SEEMS I solved the problem by calling dispose() on the frame once I finished using it, then comes the manual updating and when I set it's visibility to true it no longer does any of weird painting problems it used to. Question is why does it work? I assumeit has something to do with the fact dispose releases the visual resources but could someone please provide a slightly more in-depth explanation?
    Second, at the moment my code doesn't have any calls to validate or invalidate or repaint (and I can't call revalidate) because JFrame doesn't inherit from JComponent. So I'd like to know please, which of these methods should I call in case I manually update the frame's contents?
    Third, I'll attempt to recreate a short sample code later on today (must be off now).
    P.S. Thanks for the replies!

  • JFrame Resize issue

    Allo all.
    I have a GUI that uses one JFrame and contains a Box layout of GridLayout and BoxLayout JPanels.
    I have set Max, Min and Pref sizes for all the JPanels, which works perfectly, the Frame wont get smaller than the minimum size, and it loads at the preffered size.
    However, expanding past the Max sizes leaves the components stranded top and center of the frame, with plenty of unwanted empty space.
    Setting the JFrames max, min and pref sizes completely ruins all the others, allowing resizing to 0,0 size and full screen.
    Any ideas? A quick look showed that I'd be able to extend JTable and do it that way some how, but I wasn't sure on the exact things I'd have to override.
    Java 1.5 , and I know a fair bit about Java.

    Extending the JTable class in order to solve layout problems is NOT THE WAY!!
    You'd be asking for more trouble than you already have. Instead, consider using a combination of a GridBagLayout and some RigidArea
    Box.createRigidArea(Dimension d] ,and perhaps some Glue- or Strut-components:
    Box.createHorizontalGlue()
    Box.createStrut(int width)
    [ /code]
    That should solve many layout issues....
    dealing with GUI's ==  puzzeling around with layoutmanagers and components                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Design issue using JFrame, JPanel, JLabel

    I have been working on this problems for several months now and I and nearly finished.
    I have a design question I hope others from this forum can provide some incite to the best approach.
    The problem space is a 8 X 8 Chessboard. I have designed a board using JPanels and JLables sitting inside a JFrame. In each square on the chessboard is a JLabel with an image. The "board" sits in the DEFAULT LAYER of a JLayeredPane. As the user clicks a specific square, a queen is placed in the square (8-queens problem). The only thing I do is swap out the image. All this works well--thanks to several of you from this forum. :-)
    When I add a new queen to the board, the application goes through the evaluation of attack positions. Next, the application should display the new chessboard with only the queens not threaten by other queens. I keep up with the chessboard using an boolean array internally. I build a second boolean array for the new or refreshed chessboard.
    What I want to do is build a second chessboard and "swap" it out with the one in the default layered pane. Can someone be so kind and shine some light on this design issue for me?
    Thank you for taking the time to read my post.

    I don't understand this approach. Swing is by default 'double buffered' and will not flicker. You will get this be default since this is one of the things the Swing painting model gives over AWT.
    You should look at just using JComponent and the paintComponent() method for drawing what you need.
    What I've done in the past is have a simple XML JDoM model. Have components that render themselves based on this model.
    Changing the model then I just issues a call to repaint() at the top level container.
    You can also add and remove items from the parent container. Then issue validate() or repaint(). Can't remember now but I think validate() hits the layout manager logic and then repaints.
    I'm pretty sure the Romain guy posted an example of how to easily draw a background chess board in a panel. ;-)
    The tree concept might really prove useful for a 'gaming tree' approach at the AI also.
    If you look at the Java3D API you will see they use a tree to represent what is rendered and the details about it. Really nice until you change something in the tree that cause the renderer to blow up. ;-)
    I guess the moral is always make small simple changes and test.
    Hope this is helpful.

  • JFrame Update issues

    hi all
    I have a JFrame with a JList and a JButton in it.
    What I want is that when the button is pressed the JList gets new content from a specified file.
    The problem is that I can't figure out a way to show any changes to JFrame after it has been started.
    Since JList only seem to take data when it is created I've tried to replace the old Jlist with a new one where I have the new data. But I can't make JFrame update its view.
    I've tried update and validate and repaint in order to show the new content in JList but nothing happens.
    I've been at this for quite some time now so if you have any ideas I'll be really greatfull.

    In addition to above suggestion see the URL below
    http://java.sun.com/docs/books/tutorial/uiswing/events/listdatalistener.html
    Edited by: SuchittoPalit on Mar 13, 2009 4:27 PM

  • Java.lang.stackoverflowerror issue when calling another jframe

    i created a login screen with a username/password field that i call from my main applicaton. I call the jframe with the following code
      createDirectories();
            startNotes();
            login.start();
            getLists();once it gets to the login.start(); it give the following error
    Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
    at sun.awt.Win32GraphicsConfig.getBounds(Native Method)
    at sun.awt.Win32GraphicsConfig.getBounds(Win32GraphicsConfig.java:240)
    at java.awt.Window.init(Window.java:368)
    at java.awt.Window.<init>(Window.java:407)
    here is the full code for my login.java minus the swing component creation
    import javax.swing.JOptionPane;
    public class loginScreen extends javax.swing.JFrame {
        TESTapplication app = new TESTapplication();
            patientObject patient = new patientObject();
        public loginScreen() {       
            initComponents();        
       //initcomponents removed from here
    private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {                                        
            sendLogin();
        private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {                                         
            System.out.println("User exited application");
            System.exit(3);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {              
                 // start();
        // Variables declaration - do not modify                    
        private javax.swing.JButton btnCancel;
        private javax.swing.JButton btnLogin;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JLabel lblLoginInfo;
        private javax.swing.JPasswordField pswrdFldPassword;
        private javax.swing.JTextField txtFldUsername;
        // End of variables declaration                  
        public void start(){
            new loginScreen().setVisible(true);
        public void sendLogin(){
            if (
                    txtFldUsername.getText().trim().equals("") ||  //trim removes whitespace
                    pswrdFldPassword.getText().trim().equals("") )
                JOptionPane.showMessageDialog(null,"Complete empty field(s)","Warning",JOptionPane.WARNING_MESSAGE);
            } else {
                patient.setUsername(txtFldUsername.getText().trim());
                patient.setPassword(pswrdFldPassword.getText().trim());
                patient.setAction("login");
                app.sendPatient();
    }thanks for all help given

    I only need to call 1 new login screen and no new application... how can i call a
    function from another java file?From a method of any class you can invoke (call) methods of other classes. I use "method" rather than "function" here to emphasise that they are much more than bits of code that do something: they have a context (the object of which they are a method).
    for instance i want to call the start function of the loginScreen.java from the
    testapplication.java. i don't need any new pieces, just want to be able to open the
    loginscreen jframe from the test application jframe.I wondered before why that start() method was creating a new loginScreen, but leaving that aside... One way might be for the TESTapplication class to have a member variable of type loginScreen. When some method of TESTapplication wants to invoke the start() method it just does so:loginScreen myLoginScreen = new loginScreen();
    // much later...
    myLoginScreen.start();There is no need for the loginScreen to have its own TESTapplication member variable since, as you say. "i don't need any new pieces".
    The start() method appears to next to nothing. It makes the loginScreen instance visible. But there's already a public method to do that. Perhaps loginScreen should be a modal JDialog: calling setVisible(true) will allow the login screen to do its thing and not return until it has finished (without blocking the event queue).
    It's all really a bit speculative and will remain so until you break down your application into small pieces: not functions (actions), but classes (types of obejcts including the things they can do.) Each class should have a clear and documented description of what it does.

  • JFrame add and remove panel repaint issues

    I'm not really sure what is wrong with the code. I have tried different things. What I am trying to do is to remove a panel and then add a different panel that contains a table into a frame, so the frame displays the table panel instead of the original panel. I have the following code
    viewFrame.remove(this);  // where this is the current panel
    viewFrame.invalidate();
    JTableMAView tv = new JTableMAView(viewModel);
    viewFrame.getContentPane().add(tv);
    viewFrame.validate();
    viewFrame.repaint();
    viewFrame.refreshFrame();Thanks for any help and input in advance!

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class PanelTest extends JFrame implements ActionListener {
         JPanel one, two;
         boolean oneIsNotActive;
         Container contentPane1, contentPane2;
         JButton btnOne, btnTwo;
         public void paint(Graphics g){
              this.paintComponents(g);
         public void update(Graphics g) {
              paint(g);
         public static void main(String args[]){
              PanelTest test = new PanelTest();
              test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              test.pack();
              test.setVisible(true);
         public PanelTest() {
              initComponents();
         public void actionPerformed(ActionEvent e){
              if(e.getActionCommand().equals("swap")){
                   swapPanels();
         public  void initComponents() {
              contentPane1 = this.getContentPane();
              btnOne = new JButton("swap");
              btnOne.addActionListener(this);
              btnOne.setActionCommand("swap");
              btnTwo = new JButton("test");
              btnTwo.addActionListener(this);
              btnTwo.setActionCommand("swap");
              oneIsNotActive = false;
              one = new JPanel(new FlowLayout());
              one.add(btnOne);
              contentPane1.setLayout(new FlowLayout());
              contentPane1.add(one);
              two = new JPanel(new FlowLayout());
              two.add(btnTwo);
         private void swapPanels() {
              oneIsNotActive = !oneIsNotActive;
              if(oneIsNotActive){
                   getContentPane().remove(one);
                   getContentPane().add(two);
                   this.repaint();
              else{
                   getContentPane().remove(two);
                   getContentPane().add(one);
                   this.repaint();
    }

  • JFrame Icon issues

    My entire program resides in a JAR.
    I am trying to change the icon in the upper left corner of the frame (it is a JFrame). I have tried various methods, including but probably not limited to:
    myFrame.setIconImage(Toolkit.getDefaultToolkit().getImage("my_image.gif"));
    myFrame.setIconImage(new ImageIcon(Main.class.getResource("my_image.gif")).getImage())
    myFrame.Toolkit.getDefaultToolkit().createImage((getClass().getResource("/my_image.png")))Anyways, every time I launch the program, the coffee cup remains. I have successfully modified my JInternalFrames in the same way, however they used the setFrameIcon() method instead of the setIconImage() method, which seems to have made some sort of difference.
    Any help is greatly appreciated,
    -sdo

    To quickly save some time I will list some probable suggestions:
    The images are in the JAR, they are not in a separate directory from my class files.
    I am using vista, I'm not sure if that makes a difference, but I vaguely remember reading something about there being icon problems with the Vista L&F.
    I tried making a separate method for reading the image, and went to the extent of catching IOExceptions and printing them to the screen (read: I'm getting IO exceptions when I try to do bring in the images). I'm not sure if this happens for all of the methods I tried, but it did happen for this one:
         public static Image getImageFromFile(String s) {
              Image i = null;
              File f = new File(s);
              try {
                   i = ImageIO.read(f);
              } catch (IOException e) {
                   System.out.println("Bad things happened");
              return i;
         }Edited by: sdoking on Jan 13, 2008 5:33 AM

  • JFrame sizing issues

    I'm building a swing application (primarily for windows users) that has set JFrame window sizes. The problem I'm having is that when users have their Windows font size set to "Large Fonts" or "Extra Large Fonts" that the title bar for the JFrame window grows and forces buttons, images, text, etc to overlap in the window. Is there any way to tell what OS font size the user has selected so I can take this into account when determining what size my JFrame should be? Thanks.
    --Ioeth                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I can't seem to locate the pack() method that you mentioned. Also, the problem that I'm having is determining window size, not component placement within the window. I use a few different layout managers within the various windows of my application, and they all get pushed around by the title bar.
    --Ioeth                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Jframe Resizing issue

    Hello, I have a very nice and pretty JFrame displaying on my screen right now, and I have a resize method attached to the resize event, and after I have resized my jframe the event is fired. All very well. However, I only get one resize event, and that only occurrs after I release the mouse from resizing. I would like to get continuous resizing events while I am in the process of adjusting the jframe size.
    If I start to resize, and I move my mouse two pixels, then I want a resize event. If I move it another 10 pixels then I want another resize event or whatever. I am not overely concerned about how many I get, but I definitely want to receive more than one event at the end.
    Any ideas?

    I stumbled across a reference that may help you. Take a look at http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html which is the AWT Enhancements in the JavaTM 2 SDK, v1.4 page. It says, among other things,
    Dynamic Layout During Resize
    The bugtraq report that corresponds to this change is: 4077991.
    Previously, dynamic window resizing wasn't supported on all platforms. For example, on Windows NT, with solid resize on, resizing a window recalculated the layout only when the drag was finished. This has been fixed in this release with the addition of the new desktop property awt.dynamicLayoutSupported. When dynamic layout is enabled, a Container continually lays out its components as it resizes. If disabled, the layout will be validated after resizing has finished.
    API changes to java.awt.Toolkit.
    public void setDynamicLayout(boolean dynamic)
    protected boolean isDynamicLayoutSet()
    public boolean isDynamicLayoutActive()

  • Wait Cursor issue in JFrame / JButton

    Hi i am Creating some Archive which takes 2 to 3 min . I had set Wait Cursor
    applet.getFrame().setCursor( new Cursor(Cursor.WAIT_CURSOR));
    but after i Click Button (which shows Hand Cursor during Click) after that my wait Cursor is not shown.
    The cursor remains as Hand Cursor??

    Following Code worked for Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM
    But not Fixed for 1.5.x or JRE version 1.6.0_10 Java HotSpot(TM) Client VM
    Issue 1:
    The hand Cursor still remain as it is.
    myFrame.setWaitCursor();
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                              // business logic for Creating WAR (which takes around 5 min)
                   }Issue 2: When it takes take to create Archive , if we toggle different window 7 come back in my Application Window it shows Blank Window (or half Desktop Window / half my APplication title Window) till it doesnt creates WAR Generation. Is there some paint Issue ??
    After my War is generated I am able to view my UI

Maybe you are looking for

  • Type '[component name]' in CSS selector '[component name]' must be qualified with a namespace

    I've recently upgraded my SDK to allow me encorporate other features such as the Text Layout Framework and such. To avoid issues i've had to make Flash player 10 as required, which is where the problems are occuring in my main project. We knew the sw

  • How to save Charts to a word document using LabVIEW Report Genereration toolkit?

    I just started using the LabVIEW Report Genereration toolkit, but I can't figure out how to save Waveform Charts (one dimensional data versus time, instead of Graphs) to a Word document. Can somebody give a suggestion? Thanks!

  • Locale Formatting question

    Locale Formatting question In the preceding code the number 50 represent currency. The output of NumberFormat is 50 with the local symbol The output of DecimalFormat is 50.00 without the local symbol The question is how to show 50.00 with the local s

  • Photoshop install error.. please help

    Why cant i install photoshop CS6? I downloaded it and when i launch the setup.exe thing, it loads and then at the end it shows a error.. Heres a pic of the error(in norwegian): http://gyazo.com/2ef750437165f74ff3967a026557dd3d What its saying is that

  • Regarding maintenance of bindable value...

    Hi, For my web application I am using Cairngorm and AMF-PHP for serverside scriptting. I am also using BrowserManager, but when I reload the page all the content which I have binded went off. Telling specifically When user login all the required info