10 Replies - 2445 Views - Last Post: 24 October 2009 - 05:57 PM Rate Topic: -----

#1 livium  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 519
  • Joined: 21-December 08

How to group a number of text fields

Posted 24 October 2009 - 01:20 AM

How to group a number of text fields into a group so that i can put a title to this group?
I'm using NetBeans but i cannot find such a thing.
Please tell me!
Is This A Good Question/Topic? 0
  • +

Replies To: How to group a number of text fields

#2 livium  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 519
  • Joined: 21-December 08

Re: How to group a number of text fields

Posted 24 October 2009 - 01:38 AM

How to group a number of text fields into a group so that i can put a title to this group?
I'm using NetBeans but i cannot find such a thing.
Please tell me!
Was This Post Helpful? 0
  • +
  • -

#3 AbuJaFaR  Icon User is offline

  • D.I.C Regular

Reputation: 13
  • View blog
  • Posts: 330
  • Joined: 13-December 07

Re: How to group a number of text fields

Posted 24 October 2009 - 04:42 AM

Please dont double post.If someone knows, he will help you :^:
Was This Post Helpful? 0
  • +
  • -

#4 fsloke  Icon User is offline

  • D.I.C Regular

Reputation: 25
  • View blog
  • Posts: 412
  • Joined: 19-December 07

Re: How to group a number of text fields

Posted 24 October 2009 - 05:31 AM

Try BorderFactory....

Sample Example

//Titled borders
TitledBorder title;
title = BorderFactory.createTitledBorder("title");
jComp8.setBorder(title);

title = BorderFactory.createTitledBorder(
			   blackline, "title");
title.setTitleJustification(TitledBorder.CENTER);
jComp9.setBorder(title);




Please refer this link HowToUseBorder
Was This Post Helpful? 0
  • +
  • -

#5 DaneAU  Icon User is offline

  • Great::Southern::Land
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,617
  • Joined: 15-May 08

Re: How to group a number of text fields

Posted 24 October 2009 - 07:38 AM

How about putting them on JPanel ? inside your JFrame with a JLabel for your title ? Once done add your JPanel to your JFrame.
Was This Post Helpful? 0
  • +
  • -

#6 livium  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 519
  • Joined: 21-December 08

Re: How to group a number of text fields

Posted 24 October 2009 - 08:33 AM

View Postbbq, on 24 Oct, 2009 - 06:38 AM, said:

How about putting them on JPanel ? inside your JFrame with a JLabel for your title ? Once done add your JPanel to your JFrame.



Thanks, but that won't look like the picture i have attached. I want it to look like that.

Attached image(s)

  • Attached Image

Was This Post Helpful? 0
  • +
  • -

#7 fsloke  Icon User is offline

  • D.I.C Regular

Reputation: 25
  • View blog
  • Posts: 412
  • Joined: 19-December 07

Re: How to group a number of text fields

Posted 24 October 2009 - 09:04 AM

Try BorderFactory....

Sample Example

//Titled borders
TitledBorder title;
title = BorderFactory.createTitledBorder("title");
jComp8.setBorder(title);

title = BorderFactory.createTitledBorder(
			   blackline, "title");
title.setTitleJustification(TitledBorder.CENTER);
jComp9.setBorder(title);




Please refer this link HowToUseBorder
Was This Post Helpful? 0
  • +
  • -

#8 fsloke  Icon User is offline

  • D.I.C Regular

Reputation: 25
  • View blog
  • Posts: 412
  • Joined: 19-December 07

Re: How to group a number of text fields

Posted 24 October 2009 - 09:06 AM

Dear Admin,

Please remove this post because it is duplicate post...

Thanks
Was This Post Helpful? 0
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8325
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How to group a number of text fields

Posted 24 October 2009 - 04:46 PM

View Postlivium, on 24 Oct, 2009 - 07:33 AM, said:

View Postbbq, on 24 Oct, 2009 - 06:38 AM, said:

How about putting them on JPanel ? inside your JFrame with a JLabel for your title ? Once done add your JPanel to your JFrame.



Thanks, but that won't look like the picture i have attached. I want it to look like that.

The easiest way ?

First a GridLayout of 3 rows 1 column
First row:
a GridLayout of 1 row 3 column each cell filled with a Parargraph layout
Second row:
a Paragraph layout
Thirsd row:
a Paragraph layout

Paragraph layout available from here

http://jhlabs.com/ja...yout/index.html

View Postfsloke, on 24 Oct, 2009 - 08:06 AM, said:

Dear Admin,

Please remove this post because it is duplicate post...

Thanks

Considered it as done :^:
Was This Post Helpful? 0
  • +
  • -

#10 sakshamkum  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 19
  • View blog
  • Posts: 232
  • Joined: 09-June 09

Re: How to group a number of text fields

Posted 24 October 2009 - 05:02 PM

see we donot need two or more GridLayouts, we can use one GroupLayout for the JPanel
you will find matter about the GroupLayout on theSun's tutorial page
after that add a border from BorderFactory as our friend has said

This post has been edited by sakshamkum: 24 October 2009 - 05:14 PM

Was This Post Helpful? 0
  • +
  • -

#11 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8325
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How to group a number of text fields

Posted 24 October 2009 - 05:57 PM

View Postsakshamkum, on 24 Oct, 2009 - 04:02 PM, said:

see we donot need two or more GridLayouts, we can use one GroupLayout for the JPanel
you will find matter about the GroupLayout on theSun's tutorial page
after that add a border from BorderFactory as our friend has said

GroupLayout..... he
brand new from JRE 1.6

Good show Sakshamhum :^:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1