Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about coordinates

 
Monic Sherm
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question about placement of items during applet creation. For example, if I wanted to place a circle a particular place on the screen. I know that the jave coordinate system starts at 0,0 in the left hand corner. What I don't get is how to determine placement. Do you need to sort of guestimate your position and then check it in the appleviewer? Or is there a method in order to determine placement on the screen. I have searched for the answer and I seem to be missing it.

Thanks in advance for your help
 
Shyam Prasad Murarka
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Readers,
I don't know about what others do but I definitely guess and determine the co-ordinate position. I don't whether its a correct approach or not.
I remember one time when it had got very irritating placing objects on the screen. I had to keep compiling and checking whether the location was correct. So I made a simple program with an empty applet and made it listen to mouseClicks(). The co-ordinate points at the point where it is clicked is printed. So this way I was able to determine where to place the objects.
Hope someone has a better idea.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the applet forum...
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apart from guessing/checking you could use a GUI builder to construct the GUI. I'm not certain, but I think Eclipse and NetBeans have those built in, maybe IntelliJ as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic