NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

How to Use JTable in netbeans ?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
ankitraghu



Joined: 28 Oct 2009
Posts: 11
Location: India

PostPosted: Wed Oct 28, 2009 12:00 pm    Post subject: How to Use JTable in netbeans ? Reply with quote

I m a beginner so please don't get irritated from me !

I have taken a JTable in JFrame (by drag & Drop) & customized the columns & Rows .

I want to display the data from the database into the JTable .
I m creating a simple app where on selecting the id the data regarding the selected id is displayed in the JTable.

As far as my knowledge is concerned i m using vector to store the string consisting of rs.getstring() method as we use for JList
but i m unable to make out how to display the data in the respective column.
Means i don't know any thing about how to use JTable please exlain me!!

Please reply
Back to top
Peter Pis
Posted via mailing list.





PostPosted: Wed Oct 28, 2009 1:00 pm    Post subject: How to Use JTable in netbeans ? Reply with quote

Hi,

please take a look in this tutorial (Creating a table model):
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

Regards,
-Peter

ankitraghu wrote:
Quote:
I m a beginner so please don't get irritated from me !



I have taken a JTable in JFrame (by drag & Drop) & customized the columns & Rows .



I want to display the data from the database into the JTable .

I m creating a simple app where on selecting the id the data regarding the selected id is displayed in the JTable.



As far as my knowledge is concerned i musing vector to store the string consisting of rs.getstring() method as we use for JList

but i m unable to make out how to display the data in the respective column.



Please reply

------------------------
Raghu




Back to top
ankitraghu



Joined: 28 Oct 2009
Posts: 11
Location: India

PostPosted: Wed Oct 28, 2009 2:31 pm    Post subject: Re: How to Use JTable in netbeans ? Reply with quote

Hi Peter Pis
Its for programming on notepad , i want for Netbeans . U may think it's all the same but Peter at netbeans it just needs a method which is not specified in this tutorial, i have referred this tutorial but it doesn't works. I have learned this (what i explained above) in creating Jlist .

Please reply

------------------------
Raghu
Back to top
Peter Pis
Posted via mailing list.





PostPosted: Wed Oct 28, 2009 8:50 pm    Post subject: How to Use JTable in netbeans ? Reply with quote

Ok,

so what about this tutorial?
http://www.netbeans.org/kb/docs/java/gui-db.html

HTH
-Peter

ankitraghu wrote:
Quote:
Hi Peter Pis

Its for programming on notepad , i want for Netbeans . U may think it's all the same but Peter at netbeans it just needs a method which is not specified in this tutorial, i have referred this tutorial but it doesn't works. I have learned this (what i explained above) in creating Jlist .






Peter Pis wrote:

Quote:
Hi,





Quote:
please take a look in this tutorial (Creating a table model):



Quote:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html





Quote:
Regards,



Quote:
-Peter





Quote:
ankitraghu wrote:



Quote:
Quote:
I m a beginner so please don't get irritated from me !









Quote:
Quote:
I have taken a JTable in JFrame (by drag & Drop) & customized the columns & Rows .









Quote:
Quote:
I want to display the data from the database into the JTable .





Quote:
Quote:
I m creating a simple app where on selecting the id the data regarding the selected id is displayed in the JTable.









Quote:
Quote:
As far as my knowledge is concerned i musing vector to store the string consisting of rs.getstring() method as we use for JList





Quote:
Quote:
but i m unable to make out how to display the data in the respective column.









Quote:
Quote:
Please reply





Quote:
Quote:
------------------------



Quote:
Quote:
Raghu













------------------------
Raghu




Back to top
ankitraghu



Joined: 28 Oct 2009
Posts: 11
Location: India

PostPosted: Thu Oct 29, 2009 5:16 pm    Post subject: Query Not solved ! Reply with quote

Sorry for previous reply .

It's not working sir. In that tutorial they have not used JTable they have just explained how to view the Java DB table in JFrame.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo