This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Re: Problem with JPanel, It is realigning the buttons when it loads first time

 
kalai arasan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,


There is a problem in JPanel,when we click on first time on the page(it has N number of buttons which is shown in the screen shots),it is realigning the buttons,Even if we click on the Panel also same action performed.It should not perform that and it has to do some operation onclick of button ,please let me know any alternative on JPanel.


Am i able to clear you all, please correct me if i am wrong.


We are using Applet,AWT,Swing.


==============================================================================


Expected reesult it should not do any action when we click on panel(it realigned),It has to do an action when we click on Buttons first time also(It is doing an action second time onwards)(here also realigned)

It should not realign the buttons at all,those should be in their own place at all times.



=====================================================================================


This is our Java File.






Thanks in advance for your response,

With regards,
kalai.
FirstScreen.JPG
[Thumbnail for FirstScreen.JPG]
When we opened the Screen
SecondScreen.JPG
[Thumbnail for SecondScreen.JPG]
When we click on left panel/any of button on left panel
ThirdScreen.JPG
[Thumbnail for ThirdScreen.JPG]
When we click on right panel or any of button on right side panel
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please go easy on the use of colors in your post. They put a severe strain on the eyesight.
Also, please UseCodeTags while posting code in future. I have added them to your post. As you can see, it makes the code easy to read and understand.

I doubt of anyone is going to check through ~800+ lines of your code to identify the problem.
The best way to help us help you is to an SSCCE code which demonstrates the problem.
 
kalai arasan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am able to find out the solution for this problem.

I just replaced FlowLayout to GridLayout, thats it

It works as expected.


Thanks to all.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!