Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-18-2007, 06:59 PM
Member
 
Join Date: Nov 2007
Posts: 3
deadman_uk is on a distinguished road
Object locations via grid coordinates HELP.
Hi all, I am new here and I use BlueJ as my complier. I am completely new to java and I have ran into a problem. I need to make a program but I am stuck at the very first step (the interface).

I have made my interface with JframeBuilder and it has 10 objects. I have told the program ROUGHLY where I want the objects to go via grid coordinates. All is fine until I try and set the form background to a jpg image. The program ignores the grid coordinates and sets all objects to the top of the form.

I can get around this by using the north, east, south, west, center method but that doesn't give me the flexibility I want. I would like to set the object location via grid coordinates like JframeBuilder has done.

My Program

The link to my program is above. I would really appreciate it if someone could take a quick look and tell me why the program ignores the grid coordinates I have made when I set the form background to a jpg.

Thanks all
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-18-2007, 07:34 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,189
hardwired is on a distinguished road
Set the layout manager of the JPanel to null for absolute positioning:
Code:
panel = new JPanel(null)
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-18-2007, 07:50 PM
Member
 
Join Date: Nov 2007
Posts: 3
deadman_uk is on a distinguished road
Quote:
Originally Posted by hardwired View Post
Set the layout manager of the JPanel to null for absolute positioning:
Code:
panel = new JPanel(null)
Wow it works!!! thanks so much. If I run into any problems in the future, can I rely on you hardwired?
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-18-2007, 09:31 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,189
hardwired is on a distinguished road
I'll do what I can.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-18-2007, 09:32 PM
Member
 
Join Date: Nov 2007
Posts: 3
deadman_uk is on a distinguished road
Quote:
Originally Posted by hardwired View Post
I'll do what I can.
Thanks I can handle the interface from here, the next step is the code but if I run into any problems, I will post back here.

Thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New project VFSJFileChooser(browse local and remote locations) mrcheeks AWT / Swing 0 01-22-2008 12:05 PM
Java3D: Clicking and getting coordinates? seabhcan Advanced Java 0 01-11-2008 03:46 PM
Arc2D.Double coordinates alley Java 2D 2 11-07-2007 11:27 PM
Help creating a changing grid adlb1300 New To Java 11 10-24-2007 02:41 PM
Help with Grid Layout coco AWT / Swing 1 08-06-2007 09:03 PM


All times are GMT +3. The time now is 11:28 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org