Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 30th, 2006, 12:12 AM
bobber205's Avatar
bobber205 bobber205 is offline
Career Newbie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Dec 2005
Location: Klamath Falls, Oregon
Posts: 641 bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 Days 10 h 36 m 58 sec
Reputation Power: 6
Send a message via AIM to bobber205 Send a message via Yahoo to bobber205
Simple Java Questions about JPanels

When I changed my code to use a JPanel instead of a regular panel, my button keeps disappearing when I resize the window. It didn't do that when I used just a regular panel...

any ideas why?

Reply With Quote
  #2  
Old July 30th, 2006, 06:43 AM
crownjewel82 crownjewel82 is offline
rebel with a cause
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2004
Location: The Batsh!t Crazy State.
Posts: 5,766 crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)  Folding Points: 53188 Folding Title: Beginner FolderFolding Points: 53188 Folding Title: Beginner FolderFolding Points: 53188 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Days 15 h 56 m 28 sec
Reputation Power: 3229
can you post your code?
__________________
Resistance to tyrants is obedience to God. - Thomas Jefferson

Reply With Quote
  #3  
Old August 1st, 2006, 12:22 AM
bobber205's Avatar
bobber205 bobber205 is offline
Career Newbie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Dec 2005
Location: Klamath Falls, Oregon
Posts: 641 bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 Days 10 h 36 m 58 sec
Reputation Power: 6
Send a message via AIM to bobber205 Send a message via Yahoo to bobber205
Java Code:
Original - Java Code
  1.  
  2.  public void start()
  3.     {
  4.         JButton refButton = new JButton("Refresh!!");
  5.    
  6.         JPanel mainPanel = new JPanel(new FlowLayout());
  7.    
  8.        
  9.         mainPanel.add(refButton);
  10.        
  11.        
  12.        
  13.         getContentPane().add(mainPanel, BorderLayout.NORTH);
  14.        
  15.        
  16.     }


Guess I should add something to that. The button doesn't show up until the panel is clicked, at least in FF.

Reply With Quote
  #4  
Old August 1st, 2006, 05:31 AM
crownjewel82 crownjewel82 is offline
rebel with a cause
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2004
Location: The Batsh!t Crazy State.
Posts: 5,766 crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)crownjewel82 User rank is General 34th Grade (Above 100000 Reputation Level)  Folding Points: 53188 Folding Title: Beginner FolderFolding Points: 53188 Folding Title: Beginner FolderFolding Points: 53188 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Days 15 h 56 m 28 sec
Reputation Power: 3229
when does this method get called. If it get's called at any point after the frame is displayed then that's probably the problem.

Reply With Quote
  #5  
Old August 1st, 2006, 02:15 PM
bobber205's Avatar
bobber205 bobber205 is offline
Career Newbie
Dev Shed Novice (500 - 999 posts)
 
Join Date: Dec 2005
Location: Klamath Falls, Oregon
Posts: 641 bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level)bobber205 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 Days 10 h 36 m 58 sec
Reputation Power: 6
Send a message via AIM to bobber205 Send a message via Yahoo to bobber205
It's called in the start method. Maybe I should move it to the init method?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Simple Java Questions about JPanels


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT