1. I'm using a JDesktop... how can I set the window maximized? what's the method for that? And how can I align it to the center of screen. 2. I need to use a JProgressBar while the app connects to the database, but how can I use a progressbar without knowning the values? I dont know how much time the job will take...so there's no how I can set the values for progressbar, right? Thanks in Advance. F.
Hi, to your first question, there isn't a method, which will do that for you. You have to calculate it by your own. If you know the size of your JDesktopPane, then it should be easy for you to maximize your internal frame. Also centering should be easy. To your second question, you are right. If you have to do only one connection to the database, then you can't know, which values to set to the progress. If you have different things to do, then you can calculate it somehow, but you will never detect the remaining time.