Thread View: borland.public.jbuilder.java.swing
6 messages
6 total messages
Started by tom
Mon, 06 Feb 2006 23:33
loading screen for Java application
Author: tom
Date: Mon, 06 Feb 2006 23:33
Date: Mon, 06 Feb 2006 23:33
11 lines
1184 bytes
1184 bytes
Hi, Does anyone know how to create 'build progress' screen similar to Jbuilder uses when it compiles/makes the application? It displays a JDialog with compiling messages and closed after finished compiling the application. Thanks, Tom
Re: loading screen for Java application
Author: Paul Furbacher [TeamB]
Date: Tue, 07 Feb 2006 03:43
Date: Tue, 07 Feb 2006 03:43
34 lines
2015 bytes
2015 bytes
tom wrote:
> Does anyone know how to create 'build progress' screen similar to Jbuilder
> uses when it compiles/makes the application? It displays a JDialog with
> compiling messages and closed after finished compiling the application.
The following article may provide insight:
http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html
I'm sure there are other examples; try Googling
swing worker thread examples progress dialog
Here's one hit:
http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Re: loading screen for Java application
Author: tom
Date: Wed, 08 Feb 2006 00:44
Date: Wed, 08 Feb 2006 00:44
79 lines
3482 bytes
3482 bytes
Hi Paul,
Thanks for your suggestion. I do not need a progress dialog. I just want to
use a real simple splash screen to display some text while the java
application is loading.
I tried JDialog and JWindow; however, I can not get the text to display on
the contentPane unless I set the setModal to true, which it's kind of
defeating the purpose.
Once I set the setModal to true, it takes over the current process thread.
It will not continue until I manuall close the dialog.
Am I missing something here? Please take a look at the following code snip.
thanks,
Tom
code snip:
String status = "Loading... Please wait...";
JDialog jwin = new JDialog();
JPanel jpanel = new JPanel();
jpanel.add(
new JLabel("Now Loading...",
SwingConstants.CENTER));
jpanel.setVisible(true);
jwin.getContentPane().add(jpanel, BorderLayout.CENTER);
//jwin.setModal(true); /* visible only if enabled */
jwin.setTitle(status);
jwin.setResizable(false);
jwin.setBackground(Color.lightGray);
jwin.setBounds(400, 400, 250, 1
//Loading application here...
jwin.setVisible(false);
jwin.dispose();
"Paul Furbacher [TeamB]" <pfurbacher@mac.com> wrote in message
news:43e81693$1@newsgroups.borland.com...
> tom wrote:
>
>> Does anyone know how to create 'build progress' screen similar to
>> Jbuilder uses when it compiles/makes the application? It displays a
>> JDialog with compiling messages and closed after finished compiling the
>> application.
>
> The following article may provide insight:
>
> http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html
>
> I'm sure there are other examples; try Googling
>
> swing worker thread examples progress dialog
>
> Here's one hit:
>
>
> http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html
>
>
> --
>
>
> Paul Furbacher (TeamB)
>
> Save time, search the archives:
> http://info.borland.com/newsgroups/ngsearch.html
>
> Is it in Joi Ellis's Faq-O-Matic?
> http://www.visi.com/~gyles19/fom-serve/cache/1.html
>
> Finally, please send responses to the newsgroup only.
> That means, do not send email directly to me.
> Thank you.
Re: loading screen for Java application
Author: Paul Furbacher [TeamB]
Date: Wed, 08 Feb 2006 02:53
Date: Wed, 08 Feb 2006 02:53
37 lines
2469 bytes
2469 bytes
tom wrote:
> Thanks for your suggestion. I do not need a progress dialog. I just want to
> use a real simple splash screen to display some text while the java
> application is loading.
> I tried JDialog and JWindow; however, I can not get the text to display on
> the contentPane unless I set the setModal to true, which it's kind of
> defeating the purpose.
>
> Once I set the setModal to true, it takes over the current process thread.
> It will not continue until I manuall close the dialog.
>
> Am I missing something here? Please take a look at the following code snip.
Yes, you are missing exactly what was discussed in those
articles. Please take the time to look at them. All
you have to do is apply the principle in those articles.
The only difference is that you are not changing the text.
Conceptually it's the same whether there's dynamic update
or not. It's a threading issue, and those articles will
prime your thinking to deal with it correctly.
--
Paul Furbacher (TeamB)
Save time, search the archives:
http://info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
Re: loading screen for Java application
Author: Ian Mills
Date: Sat, 11 Feb 2006 10:51
Date: Sat, 11 Feb 2006 10:51
88 lines
3977 bytes
3977 bytes
tom wrote:
> Hi Paul,
>
> Thanks for your suggestion. I do not need a progress dialog. I just want to
> use a real simple splash screen to display some text while the java
> application is loading.
> I tried JDialog and JWindow; however, I can not get the text to display on
> the contentPane unless I set the setModal to true, which it's kind of
> defeating the purpose.
>
> Once I set the setModal to true, it takes over the current process thread.
> It will not continue until I manuall close the dialog.
>
> Am I missing something here? Please take a look at the following code snip.
>
>
> thanks,
>
> Tom
>
> code snip:
>
> String status = "Loading... Please wait...";
> JDialog jwin = new JDialog();
> JPanel jpanel = new JPanel();
> jpanel.add(
> new JLabel("Now Loading...",
> SwingConstants.CENTER));
>
> jpanel.setVisible(true);
> jwin.getContentPane().add(jpanel, BorderLayout.CENTER);
>
>
> //jwin.setModal(true); /* visible only if enabled */
> jwin.setTitle(status);
> jwin.setResizable(false);
> jwin.setBackground(Color.lightGray);
> jwin.setBounds(400, 400, 250, 1
>
> //Loading application here...
> jwin.setVisible(false);
> jwin.dispose();
>
> "Paul Furbacher [TeamB]" <pfurbacher@mac.com> wrote in message
> news:43e81693$1@newsgroups.borland.com...
>
>>tom wrote:
>>
>>
>>>Does anyone know how to create 'build progress' screen similar to
>>>Jbuilder uses when it compiles/makes the application? It displays a
>>>JDialog with compiling messages and closed after finished compiling the
>>>application.
>>
>>The following article may provide insight:
>>
>> http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html
>>
>>I'm sure there are other examples; try Googling
>>
>> swing worker thread examples progress dialog
>>
>>Here's one hit:
>>
>>
>>http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html
>>
>>
>>--
>>
>>
>>Paul Furbacher (TeamB)
>>
>> Save time, search the archives:
>> http://info.borland.com/newsgroups/ngsearch.html
>>
>> Is it in Joi Ellis's Faq-O-Matic?
>> http://www.visi.com/~gyles19/fom-serve/cache/1.html
>>
>> Finally, please send responses to the newsgroup only.
>> That means, do not send email directly to me.
>> Thank you.
>
>
>
I think you probably need to set your dialog visible and not the JPanel.
i.e. jwin.setVisible(true) after adding the JPanel.
Re: loading screen for Java application
Author: tom
Date: Thu, 13 Jul 2006 20:36
Date: Thu, 13 Jul 2006 20:36
47 lines
2737 bytes
2737 bytes
I found a very nice FREE API for JFC/Swing that solves my problem. It's called Foxtrot. Tom "Paul Furbacher [TeamB]" <pfurbacher@mac.com> wrote in message news:43e95c3d$1@newsgroups.borland.com... > tom wrote: > >> Thanks for your suggestion. I do not need a progress dialog. I just want >> to use a real simple splash screen to display some text while the java >> application is loading. >> I tried JDialog and JWindow; however, I can not get the text to display >> on the contentPane unless I set the setModal to true, which it's kind of >> defeating the purpose. >> >> Once I set the setModal to true, it takes over the current process >> thread. It will not continue until I manuall close the dialog. >> >> Am I missing something here? Please take a look at the following code >> snip. > > Yes, you are missing exactly what was discussed in those > articles. Please take the time to look at them. All > you have to do is apply the principle in those articles. > The only difference is that you are not changing the text. > Conceptually it's the same whether there's dynamic update > or not. It's a threading issue, and those articles will > prime your thinking to deal with it correctly. > > > -- > > > Paul Furbacher (TeamB) > > Save time, search the archives: > http://info.borland.com/newsgroups/ngsearch.html > > Is it in Joi Ellis's Faq-O-Matic? > http://www.visi.com/~gyles19/fom-serve/cache/1.html > > Finally, please send responses to the newsgroup only. > That means, do not send email directly to me. > Thank you.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads