Results 1 to 7 of 7
  1. #1
    Karanam is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default Display of tables and labels in the same pane

    Hi friends,

    I need some assistance to display the labels and table as when the they are created shown below format

    labels1

    table1

    labels2

    labels2

    table2


    thnx and rgds
    Karanam

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

    Default

    Have you looked at the Table class in the Java libraries?
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  3. #3
    Karanam is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default Thanks for the reply

    I have created the tables and the labels dynamically but they are displayed in the horizontal fashion but i need the same in the vertical fashion.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

  5. #5
    Karanam is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default Thanks for reply Mr.Burke

    I'm using GroupLayout for creating the layouts where TableGroupLayout is layout designed for Tables where as the for label it is LabelGroupLayout

    TableGroupLayout code.
    (and in the same manner LabelGroupLayout is created)

    PHP Code:
    TableGroupLayout.setHorizontalGroup(TableGroupLayout.createSequentialGroup()
             .addComponent(tableView)
            .addGroup(TableGroupLayout.createParallelGroup(GroupLayout.Alignment.LEADING))        
            );
             TableGroupLayout.setVerticalGroup(TableGroupLayout.createSequentialGroup()
            .addComponent(tableView)
            .addGroup(TableGroupLayout.createParallelGroup(GroupLayout.Alignment.LEADING))        
            );
    Global group layout which displays both the layouts

    PHP Code:
    groupLayout.setHorizontalGroup(
                        groupLayout.createSequentialGroup()
                        .addGroup(LabelGroupLayout.createParallelGroup(GroupLayout.Alignment.TRAILING))    
                        .addContainerGap(10,10)
                        .addGroup(TableGroupLayout.createParallelGroup(GroupLayout.Alignment.LEADING))
                );
                 groupLayout.setVerticalGroup(groupLayout.createSequentialGroup()                      
                 .addGroup(LabelGroupLayout.createParallelGroup(GroupLayout.Alignment.LEADING))
                         .addContainerGap(10,10)
                 .addGroup(TableGroupLayout.createParallelGroup(GroupLayout.Alignment.LEADING))
                 )

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Group Layout is only meant for use with NetBeans code generation software. You need to learn and use other layouts here if you are going to be manipulating things by hand.

  7. #7
    Karanam is offline Member
    Join Date
    Sep 2008
    Posts
    5
    Rep Power
    0

    Default Thanks for helping

    My thanks to all for those who helped me in the java forum

    I tried all kinds of layouts to display but at last i tired with MigLayout its working fine.

Similar Threads

  1. Tabbed pane using struts 2.x......?
    By prabhurangan in forum Web Frameworks
    Replies: 1
    Last Post: 07-19-2008, 06:48 AM
  2. Layered Pane Demo
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-26-2008, 07:44 PM
  3. call exe in Desktop Pane
    By smartsubroto in forum New To Java
    Replies: 4
    Last Post: 06-16-2008, 07:49 AM
  4. Working with Labels on Panels.
    By vargihate in forum AWT / Swing
    Replies: 2
    Last Post: 01-04-2008, 04:09 AM
  5. Aligning Labels
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-02-2008, 06:26 PM

Posting Permissions

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