Results 1 to 7 of 7
- 03-19-2011, 07:37 AM #1
Member
- Join Date
- Mar 2011
- Location
- Manassas, VA
- Posts
- 14
- Rep Power
- 0
[SOLVED] Layout errors, windows shows but no components
I'm trying to create a login screen but I can't figure out the best way to configure the layout...any ideas/suggestions are appreciated!
Last edited by Bmorebob; 03-20-2011 at 07:30 PM. Reason: DB pointed out some mistakes I made in asking the question
- 03-19-2011, 08:06 AM #2
1. To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem. Note that the code you posted is NOT a SSCCE on at least three accounts:
-- doesn't compile
-- lots of code unrelated to the stated problem
-- no main(...) method
Also, the code you posted isn't the code that produced the error trace.
-- the exception was thrown from line 80 of Login.java in the constructor. In the code posted, line 80 isn't in the contructor.
-- the error trace includes a MainMenu class with a DBListener inner class which isn't present in the posted code.
I suggest you go through How to ask questions the smart way
dbLast edited by DarrylBurke; 03-19-2011 at 08:13 AM.
- 03-19-2011, 08:25 AM #3
Member
- Join Date
- Mar 2011
- Location
- Manassas, VA
- Posts
- 14
- Rep Power
- 0
Thanks db, I've edited the code in the question to make it SCCE, with the error that's being outputted it's still compiling...but something in my layout is screwed up and I can't figure it out...
- 03-19-2011, 10:19 AM #4
That's a warning, not an error. The warning contains an instruction on how to obtain details, did you do that?
Moreover, that warning doesn't arise from the code posted.Recompile with -Xlint:deprecation for details.
Also, the posted code still has one error -- a missing semicolon.
db
- 03-19-2011, 02:59 PM #5
Member
- Join Date
- Mar 2011
- Location
- Manassas, VA
- Posts
- 14
- Rep Power
- 0
Oh....when I run it the window shows but again, no components.
Here's the layout I'm trying to get...more or less: http://www.google.com/imgres?imgurl=...w=1440&bih=772Last edited by Bmorebob; 03-20-2011 at 07:31 PM.
- 03-19-2011, 05:54 PM #6
Constructing a JPanel and assigning it to a variable called contentPane doesn't automagically make it the contentPane of a JFrame. I don't see where you add(...) the panel to the frame.
Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)
db
- 03-19-2011, 07:10 PM #7
Member
- Join Date
- Mar 2011
- Location
- Manassas, VA
- Posts
- 14
- Rep Power
- 0
Similar Threads
-
[newbie] Exception in thread "AWT-EventQueue-0" java.lang.Error
By jon80 in forum New To JavaReplies: 4Last Post: 06-07-2009, 12:59 AM -
[newbie] Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException:
By jon80 in forum New To JavaReplies: 3Last Post: 06-07-2009, 12:14 AM -
[newbie] Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException
By jon80 in forum New To JavaReplies: 12Last Post: 05-26-2009, 01:48 PM -
[SOLVED] pls help :S . "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerE
By ara in forum New To JavaReplies: 10Last Post: 01-29-2009, 08:00 AM -
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException
By leonard in forum New To JavaReplies: 1Last Post: 08-06-2007, 06:04 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks