File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes GUI help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "GUI help" Watch "GUI help" New topic
Author

GUI help

Benjamin Benington
Greenhorn

Joined: Feb 16, 2005
Posts: 3
I am designing my first GUI using the Gridbaglayout. I have a content panels called "Shipping Method" with two radio buttons, Ground and Air Express. i have the two radio buttons spaced out properly. I was wondering how I can get the space between the 'ground' radio button and the border of the content panel to decrease? Like there is alot of empty space between the 'Ground' radio button the border surrounding my content panel called "Shipping Method" on both the top and bottom. I tried playing around with the insets, but I could not get it to work. Any help would be appreciated. My code is below (I have to use gridbaglayout)




[ March 09, 2005: Message edited by: Mark Spritzler ]
[ March 09, 2005: Message edited by: Benjamin B ]
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
A couple things:

First when you post code use the code tags (button below where you type) and you can go back and edit your post by clicking on the paper and pencil icon.

Second I would recommend skipping the GridBagLayout and get JGoodies Forms.

I'll post some more ideas when I get home.

P.S. Oops, Sorry I missed the part about having to use GBL.
[ March 09, 2005: Message edited by: Steven Bell ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

"soccer bum"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
[ March 09, 2005: Message edited by: Mark Spritzler ]

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I'm not sure that I can be much help without compiling and running your program to see what is going on. Unfortunately, I can't do that at the moment as I'm not at my own computer that I typically use for development. With that said, you may want to mosey over to our GUI forum where they discuss such intricacies. You are more likely to find someone there who can help.

Layne

p.s. Could you also edit your code so the lines aren't so long? I find horizontal scrolling somewhat annoying.
[ March 09, 2005: Message edited by: Layne Lund ]

Java API Documentation
The Java Tutorial
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
add this line

Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Hi, Benjamin B

Welcome to JavaRanch! Unfortunately a last initial does not meet the requirements of the JavaRanch Naming Policy which requires a first and last name separated by a space.
You can change it here.

Thanks!


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Sorry, can't help you with your problem - I try to avoid GridBagLayout whereever I can.

But when you get too frustrated, you might want to take a look at http://madbean.com/blog/2004/17/totallygridbag.html for a relief.

Moving to the Swing forum...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: GUI help
 
Similar Threads
Refresh Jtable went you press update button
Saving drawing on simple paint application problem
GUI help
GUI help
Split Pane not working