aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JavaSE Swing app minimizes automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JavaSE Swing app minimizes automatically" Watch "JavaSE Swing app minimizes automatically" New topic
Author

JavaSE Swing app minimizes automatically

Emi Garcia
Greenhorn

Joined: Nov 02, 2010
Posts: 16
hi! im new here, great forum. im from argentina, so sorry about my ugly english.

i have a javaSE app thay minimizes automatically every time y click the ok or the yes/no button of a dialog.

it has been developed under linux in netbeans 6.8, (hibernate/JPA/MYsql) using @Actions for buttons with the ide facility.

running the app in linux it works great! buy under win i have that minimize problem.

tha app is sopoused to be used under win, and its very annoying to have the aoo minimized after every dialog.

please can you help me? has it happened to you?

the code of the dialogs is like this:


thanks

Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4529
    
    5

Hi Emi and welcome to the Ranch! To get better help sooner, post a SSCCE that clearly demonstrates the problem.
http://mindprod.com/jgloss/sscce.html


luck, db
There are no new questions, but there may be new answers.
Emi Garcia
Greenhorn

Joined: Nov 02, 2010
Posts: 16
ok, i started a new project to make a really small SSCCE, but the error desnt reproduce there!

so i shrink the original project as much as i could. becuause if i shrink it more the error isnt reproduced.

so the error happens running the project in windows, where you have several apps running, when the dialog comes up and you select an option, the windows is send to the back. (not minimizes as i thought .. its send to the back) but i dont put any code to send it to the back, and in linux it works perfectly.

this time it was last compiled in netbeans 6.9.1 over windows

what you have to do to reproduce the error is the following:

1) run the app
2) click the button that says CLIENTES
3) click the bottom roght button that says REGISTRAR
4) a dialog comes out, there you select no and the error happend, the window is send to the back
(remember you must have other apps running to have several windows if not it couldn go to the back, since theres no back )

-- i hardly try to put a dialog without this steps but there it wont reproduce the error---

the dialog is trigered in class VISTAS.CLIENTES.RegistrarUnNuevoCliente4.java

line 1214

if you cant reproduce the error tell me and i post some screenshots. hope you can help me.

the project is here:

http://www.mediafire.com/?96b4v495e7hp174
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4529
    
    5

If it's too much code to post here, it's too much for me to go through. Good luck finding someone else who will.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

I agree with Darryl. That's why he asked for an SSCCE - it shows the same problem but in far fewer lines of code.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Emi Garcia wrote:ok, i started a new project to make a really small SSCCE, but the error desnt reproduce there!


Yes. This is one of the purposes of making an SSCCE. So now you have code which doesn't exhibit the problem. But of course it also doesn't do what you want it to do. So start adding in more of your original code to that SSCCE. Add a small amount at a time, and test frequently. When the problem starts to occur, then you should suspect that the last small amount of code you added was what caused the problem.
Emi Garcia
Greenhorn

Joined: Nov 02, 2010
Posts: 16
sorry i didnt want to offend you with such amount of code. but an empty desktop aplication with netbeans, that was where is started to develop is 2MB!

anyway i think the problem must be there when the dialog is launched, i dont think that we have to read all the code. just debug and see why its send to the back. iva debugged it but i cant realize why its doing so!!

i will really apreciate if unless could run the up in win, and just tell me if the same happend to you..

i know is a lot of code, thays why in the begining i just ask if someone else had the same issue.

its really a rere behaving of java, since in linux it works great..

do you think it can be a bug or samethinl like that of the windows java virtual machine??

i rally work to get that 18mb, the hole proyect is 43.6 MB

thanks anyway
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Emi Garcia wrote:sorry i didnt want to offend you with such amount of code. but an empty desktop aplication with netbeans, that was where is started to develop is 2MB!

anyway i think the problem must be there when the dialog is launched, i dont think that we have to read all the code. just debug and see why its send to the back. iva debugged it but i cant realize why its doing so!!

Either add functionality to the SSCCE until you get the same error, or remove big chunks of code from a copy of your big program until you don't get the error. Either way, you'll have isolated the error.

i will really apreciate if unless could run the up in win, and just tell me if the same happend to you..

OK, I bit and downloaded the beast, but it requires too many things that I don't have linked to my system, such as hibernate.


i know is a lot of code, thays why in the begining i just ask if someone else had the same issue.
its really a rere behaving of java, since in linux it works great..
do you think it can be a bug or samethinl like that of the windows java virtual machine??

What do you think are the odds that you've made a mistake vs. the creators of Java? Who do you think is less expert thus more likely to make an error? I know that in my experience whenever I was absolutely positively sure that Java was at fault, I've been wrong 100% of the time. Perhaps your luck is better than mine.
Emi Garcia
Greenhorn

Joined: Nov 02, 2010
Posts: 16
What do you think are the odds that you've made a mistake vs. the creators of Java? Who do you think is less expert thus more likely to make an error? I know that in my experience whenever I was absolutely positively sure that Java was at fault, I've been wrong 100% of the time. Perhaps your luck is better than mine.


i think you are right, but i dont undestand why.. if i never put any line of code to send the window to the back...

and why it behaves different in linux?? it supoused to be portable.. so it must beheave in the same way...

anyway im 90% shure its my mistake.. thats why im asking here, and not trying to repor a bug to SUN.

thank you a lot for downloading the beast

ill try to do it even smaller..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaSE Swing app minimizes automatically