The Artima Developer Community
Sponsored Link

Java Answers Forum
plz help!!!

1 reply on 1 page. Most recent reply: Aug 3, 2004 7:05 AM by mausam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Alex

Posts: 1
Nickname: sandros
Registered: Jul, 2004

plz help!!! Posted: Jul 30, 2004 6:51 AM
Reply to this message Reply
Advertisement
Hi!
I have to make 2 questions, for Java, hope you can help me!
Im java beginner and I just make a program, with Swing tools, I create an object JFrame, call a class, where I have JButtons, labels, textboxes etc.
JFrame input=new Test();
my programme works correctly but I need 2 things plus!
1) I want in some parts when I press a button, after all the works it does, I want to recall the class from the beginning so it repaint the frame with the new objects (because of the new data). Is there any way?i tried the repaint(); but does nothing. I want to clear all the frame and start test() from the beginning so I paints again the frame.
2)i have a frame (JPanel) where I have buttons. The number of buttons change dynamically. I use GridBagLayout. But when the numbers of buttons/labels is bigger than the JPanel can be, the buttons get together and the letters in labels can not be read!!! I want, when the buttons get more than the JPanel can have, put a scroller in it!!! How can I put it?
Thanks for reading all this!!! Sorry my English are not good! Im not English :)
Have a nice day all!


mausam

Posts: 243
Nickname: mausam
Registered: Sep, 2003

Re: plz help!!! Posted: Aug 3, 2004 7:05 AM
Reply to this message Reply
See u must be adding buttons to JPanel.

Add JPanel to a JScrollPane and then add JScrollPane to the parent frame.

In question 1 what u want to do?

revalidate(), invalidate() or repaint()

Flat View: This topic has 1 reply on 1 page
Topic: M x N dimensional array(concurrent) Previous Topic   Next Topic Topic: how to call to bean from jsp in weblogic 6.1

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use