Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Moving a picture down a bit

 
K An
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what I have:
http://www.imagedump.com/index.cgi?pick=setandget&tp=122498&poll_id=0&category_id=19&warned=y

and this is what I want:
http://www.imagedump.com/index.cgi?pick=setandget&tp=122499&poll_id=0&category_id=19&warned=y

Here's my code:


I don't know how to do this. Any help is appreciated.
Thanks
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, K An!

I'm moving this to the Swing / AWT / SWT / JFace forum, where folks love to get all messy with this GUI stuff...
 
Pat Hays
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using BorderLayout instead of GridLayout
 
K An
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way less complicated? I was hoping a could turn the .west part into a 2,1 grid or something. I'm not fimiliar with a lot of the things in your code, though it works perfectly. Is there a simple thing like \n or something to that effect?
 
K An
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, just figured it out.
Thanks you very much. You were a great help
 
Pat Hays
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
less complicated code:

Just focus on the following code, the contentPane is using BorderLayout & another JPanel is using GridLayout.

contentPane.setLayout(new BorderLayout(0, 0));
contentPane.add(panel_loges, BorderLayout.WEST);
contentPane.add(jTabbedPane1, BorderLayout.CENTER);

jLabel1.setIcon(new ImageIcon("money.jpg"));
jLabel2.setIcon(new ImageIcon("2000.gif"));

panel_loges.setLayout(new GridLayout(2, 0, 5, 5));
panel_loges.add(jLabel1, 0);
panel_loges.add(jLabel2, 1);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic