Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JPanel inverted  RSS feed

 
Gabriel White
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, just wanted to drop a quick question on you. I have a JPanel that I am placing things on but as you know the JPanel is constructed with its height and width starting from 0,0 in the upper left hand corner.

The height of my panel is 600.

The problem that I am having is that when I place the objects on the panel they are going up instead of down. I know that there has to be an easy fix for this, but I cannot seem to come up with one.

I would assume that I could just do a getHeight() - 600 to compensate for the panel, but that didn't work.

The goal is to have the objects go down instead of up.

Here is my code if anybody is interested.

Thanks in advance:
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you are drawing one column at a time, from top to bottom. Think about drawing
rows and columns.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!