Results 1 to 3 of 3

Thread: Layout manager

  1. #1
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    10

    Question Layout manager

    I am building an applet, I want it to look like this:
    Java Code:
    Label:TextField
    Label:TextField
    Label:TextField
    Label:TextField
    Label:TextField
    Label:TextField
    ++++++++++++++++++++++++++
    JTable from here down.....
    Sorta crude, I know... not skilled at ascii art.

    There are two areas, one the upper 35% holds five lables and associtated TextInput, below is a table. On button press, table gets row added from TextField(s). on button push, entire table gets "reformatted" and fields become part of a document which has a very standard invoice look and feel.

    I tried to do Layout Managers recently, ended up with five hundred lines of code and a North,South,East,West,Center that did not ever balance.

    Probably I should try Box Layout, no?

    Can I just edit the table directly? What I have in mind looks like the box layout but if I could put an rtf editor in one pane and have a JTable that auto-adds on fireTableEvent then it is possible I could get a lot done tomorrow.

    All level of suggestion welcome.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    28

    Default

    There are likely many ways to skin this cat. One is to place the JTable-holding JScrollPane in the main JPanel in the CENTER position of a BorderLayout and have the JLabel / JTextFields set on top in their own JPanel in the NORTH position. This north JPanel can use layouts to keep the labels and panels looking nice such as GridBagLayout, or I like to use a mixture of BorderLayout and GridLayout.

    Can you post a link to an image of what you have so far?
    Last edited by Fubarable; 11-24-2008 at 02:44 AM.

  3. #3
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    10

    Talking Swing, Second Edition by Manning

    Quote Originally Posted by Fubarable View Post
    Can you post a link to an image of what you have so far?
    I will put the code on the server, very blunder-ridden right at the moment so expect half-converted sample code and hundred-line copy-pastes from sample code as place-holders, I got a clean compile last night before I powered down but I was so lost I could not recover my hours for another project that I stopped Thursday at Ten A.M. to focus on the resume work order that eventually leads to this.

    My profile lists compseconcepts.info which maps on some kind of DNS re-map to where the code will actually be. I do not know how to get a screen-shot, I have been told you just do "Print Screen" on the keyboard and tab over to Paint then cntrl-V .... before that I have to get some code that will put up a screen ( duh and that sort of thing await me this morning )

    Quote Originally Posted by Fubarable View Post
    There are likely many ways to skin this cat. One is to place the JTable-holding JScrollPane in the main JPanel in the CENTER position of a BorderLayout and have the JLabel / JTextFields set on top in their own JPanel in the NORTH position. This north JPanel can use layouts to keep the labels and panels looking nice such as GridBagLayout, or I like to use a mixture of BorderLayout and GridLayout.
    It's the preferred size thing I tried to use to get BorderLayout to work last time, I thiink I had the arithmetic wrong, I still have the code for that one also.....this is a start from zero so ( ? )

    I'll have the code up - should be by 02:00 GMT ( 7:53 AM 11-24-2008 CST right now ) it's LogonShell for xcallmejudasx right now.

    It will read:
    Java Code:
    Discussion page for Java 
    The code here is part of a discusiion of an opinion with Fubarable.
    when I have the code posted for:
    Java Code:
    /**
    *
    *
    *
    *
    */
    public class TPSA_Logon extends javax.swing.JApplet
    In the interim, you can look at Kitty Keyboard Kochi as my best effort so far, that was done with CSS but I do not see where we are going to get a "Printer Friendly" using CSS.

    Maybe we can do a new standard: "Cats Shall Survive" and write an rfc on the matter. Then we can tell people that Cats can dance.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

Similar Threads

  1. Layout Manager of JApplet
    By Peter_APIIT in forum Java Applets
    Replies: 10
    Last Post: 07-19-2008, 05:37 AM
  2. How to create a customized layout manager
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-26-2008, 07:41 PM
  3. Border Layout
    By mark-mlt in forum Java Applets
    Replies: 5
    Last Post: 05-12-2008, 09:48 AM
  4. MiG Layout Manager 2.4
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-16-2007, 05:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •