Results 1 to 14 of 14
- 05-21-2009, 11:20 PM #1
Member
- Join Date
- Feb 2009
- Posts
- 27
- Rep Power
- 0
Help with displaying new information on an applet
For those of you who have helped me in my last creation, i thank you :-), however now i have managed to get the login working and sucesfuly talking to a database to query a user name and password, what i want to know, is that once this has done, how do you refresh the screen so that it is blank and you can have new things put on it?
-
You might want to look into using a CardLayout here. The Sun Swing tutorials will show you how.
- 05-21-2009, 11:23 PM #3
Member
- Join Date
- Feb 2009
- Posts
- 27
- Rep Power
- 0
yeah someone suggested using a card layout, however it seems a bit complex to implement.
-
Nah, it's a piece of cake. Why not give it a try, and if it doesn't work for you, post your attempt here. The tutorial is pretty complete though, so you should go through it first before trying anything. You can find it here: CardLayout Tutorial
- 05-22-2009, 01:13 AM #5
Member
- Join Date
- Feb 2009
- Posts
- 27
- Rep Power
- 0
Ok, i have had a look at the tutorials, but how would i go around putting the items such as textboxes and buttons on to one card, would it just be a case of wrapping this around like one pannel, and if the user login is ok, show panel 2?
-
You place your components on a JPanel using whatever layout manager(s) that you need. This is no different from other Swing apps you'll make.
I think so, but I'm not 100% sure what you're trying to say here.... would it just be a case of wrapping this around like one pannel, and if the user login is ok, show panel 2?
- 05-22-2009, 09:36 AM #7
Senior Member
- Join Date
- Mar 2009
- Posts
- 552
- Rep Power
- 5
To clear the entire screen just call setVisible(false) on your JFrame(or Frame). If you still want the frame visible, but you want it empty, call removeAll() on it.
If the above doesn't make sense to you, ignore it, but remember it - might be useful!
And if you just randomly taught yourself to program, well... you're just like me!
- 05-22-2009, 12:36 PM #8
Member
- Join Date
- Feb 2009
- Posts
- 27
- Rep Power
- 0
What i want to do, is after the person has logged in, clear the user name and password box, and then display a few drop down menus and stuff
- 05-22-2009, 04:08 PM #9
Member
- Join Date
- Mar 2009
- Posts
- 25
- Rep Power
- 0
call the removeAll() method, then rebuild the GUI then call validate().
-
- 05-22-2009, 06:21 PM #11
Member
- Join Date
- Feb 2009
- Posts
- 27
- Rep Power
- 0
So can i just put this at the end of the code?
-
Based on the information that we know, I have no idea at all. My laptop currently lacks the ability to reach through the internet and see what your code looks like. I'm planning on upgrading soon though.
- 06-01-2009, 03:15 PM #13
Member
- Join Date
- Feb 2009
- Posts
- 27
- Rep Power
- 0
Basicaly there is a border layout which has a user name, password and a response field. It will query this ok, but what i want to know is how to then move on to another form as it were
-
Similar Threads
-
getSize() issue - Displaying object in 3 locations in Applet
By furry in forum New To JavaReplies: 4Last Post: 03-21-2009, 11:43 PM -
Security Information
By saty_32016 in forum CLDC and MIDPReplies: 0Last Post: 03-05-2009, 08:14 AM -
Applet - Displaying an HTML page with a selected resolution
By Java Tip in forum Java TipReplies: 0Last Post: 03-10-2008, 02:36 PM -
how to send information from applet?
By christina in forum Java AppletsReplies: 1Last Post: 08-06-2007, 04:11 AM -
Information about Struts
By Felissa in forum Web FrameworksReplies: 2Last Post: 07-02-2007, 04:40 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks