Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java dynamic gui help

 
Ali Bm
Greenhorn
Posts: 2
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I posted this question the other day in SomeOtherForum.com Java-forums.org, but wasn't able to get a good answer, so now I'm asking here...
I have a project and I'm working on the important part now.
I want to create this interface in the end and informations in DB.
This my goal, this is a prototypical interface created with MockupScreens


now I created this interface, I think I'm progressing slowly because I made it in one day
it needs more work on...
This is the ouput:


This interface is composed by :
- one columnPanel with a GridLayout
- a rowPanel which contains the 5 buttons : ( title of row + up + down + delete + add)

Now I created the add button but itsn't woks like I want.
It adds rowPanel in columnPanel. For example when I click add buttton on row N°0 60, the next rowPanel will be in the end of list not just after.
I want the new rowPanel appear between N°0 60 and N°0 13 .

I added a random number with number of row to differentiate between rowPanels.
Someone have an idea.
I tryed to print the index of rowpanel using getComponent() but it always gives 0.



Here's my full code:



Also I wouldn't start adding rowPanels by the start button,
I created it because it call the addRow method and the first rowPanel won't appear.

Waiting for your response.
Thanks in advance.
Best regrads,
Ali.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Welcome to the Ranch!

2. Please BeForthrightWhenCrossPostingToOtherSites.
http://www.java-forums.org/awt-swing/40000-can-i-add-elements-java-gui-2.html

edit: and http://www.daniweb.com/forums/thread351492.html

3. Please read the JavaRanch Official policy on registered names.
 
Ali Bm
Greenhorn
Posts: 2
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry brothers,
I posted this question the other day in Java-forums.org, but wasn't able to get a good answer, so now I'm asking here...
 
Rob Spoor
Sheriff
Pie
Posts: 20608
63
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And that's fine, but you should tell us that you've posted the same question on other boards, and tell the people on the other boards that you have posted the question here; Darryl's link to BeForthrightWhenCrossPostingToOtherSites says why.

And you should follow the advice from Darryl's point 3.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic