Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2004

Tip: Looking for answers? Try searching our database.

Adding JProgressBar to JLayeredPane

Thread view: 
amit phalgune - 05 Feb 2004 10:17 GMT
Hi,
I am having problems with adding a progressbar to a JlayeredPane.
Below is the code I have.
I can see the JLayeredPane, but cannot see the ProgressBar inside it.
Do u know what the prblem might be ?
ovpg1 is the object for the progressbar and jlp is the object for the JLayeredPane.
Am I missing something ?

Thanks
Amit

JLayeredPane jlp=new JLayeredPane();
JProgressBar ovpg1 = new JProgressBar();

jlp.setPreferredSize(new Dimension(2000,2050));
lp.setBorder(BorderFactory.createTitledBorder("JLayeredPane"));
ovpg1.setStringPainted(true);
ovpg1.setAlignmentX(2.7f);
ovpg1.setBorder(BorderFactory.createTitledBorder(
               "The first progressbar's layer and position "));
ovpg1.setValue(90);
ovpg1.setBorderPainted(true);
ovpg1.setBackground(Color.green);
ovpg1.setForeground(Color.red);

jlp.add(ovpg1,new Integer(10)); // Default is the bottom layer.
toolbar.add(jlp);
ak - 06 Feb 2004 12:39 GMT
> I am having problems with adding a progressbar to a JlayeredPane.

http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html

--

____________

http://reader.imagero.com the best java image reader.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.