Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Have Programming Question? Ask it here!

1 Answer(s)      3 years and 9 months ago
Posted in : Swing AWT

Sir this is table code. i created successfully ,but i want to get table could you please help me for this problem.Thank you sir import java.util.*; import java.awt.*;

import javax.swing.*; import javax.swing.event.*; import java.awt.event.*; import java.awt.print.*; public class table extends JFrame { //3 month table details JTable table=null; JScrollPane js=null; Container cp=null; JPanel p=null; JLabel months3=null,date=null,ghba1c=null,per=null; JButton jb1=null;

public table() { cp=getContentPane(); cp.setLayout(null); cp.setBackground(;

//3months details months3=new JLabel("3 Months-Report"); date=new JLabel("Date"); ghba1c=new JLabel("GHbA1c"); per=new JLabel("%");

//3 months details String a[][]=new String[2][2]; final Object colheads[]={"Date","%"}; final Object rowdata[][]={{"",""},{"",""},{"",""},{"",""},{"",""},{"",""}}; table=new JTable(rowdata,colheads); p=new JPanel(null); months3.setBounds(40,10,300,40); date.setBounds(190,20,300,40); ghba1c.setBounds(400,20,300,40); per.setBounds(470,20,300,40); table.setBounds(100,50,460,80); jb1=new JButton("submit"); jb1.setBounds(790,400,100,40); int h=ScrollPaneConstants.HORIZONTALSCROLLBARAS_NEEDED; int v=ScrollPaneConstants.VERTICALSCROLLBARAS_NEEDED;

cp.add(per); cp.add(ghba1c); cp.add(date); cp.add(months3); cp.add(table); cp.add(jb1);

addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we)
{ dispose(); //System.exit(0); } }); } public void actionPerformed(ActionEvent ae) {

} public static void main(String args[]) { table o=new table(); o.setSize(900,900);; } }

View Answers

November 29, 2010 at 3:17 PM

Hello Friend,

Please go through the following link:

Get Cell Values


Related Tutorials/Questions & Answers:
query in JDBC
query in JDBC  What are the steps required to execute a query in JDBC
query optimization
query optimization  hai ! i need a code in java for database query optimization.plz help
query string
query string  Need some examples of query strings.send me as soon as possible. Regards, R.Santhosh
Query Question
Query Question  How would I write a query to display the name, department of the employee that earns the highest salary in the Employees table
HQL Query
HQL Query  Hibernate query language: How to use a left join in Hibernate query language. Can somebody help with an example. I am getting a unexpected token error in HQL Query tool If I use joins
Sql Query
Sql Query  Is this query work in Db2 or not ? Select * from FORUM LIMIT 2
jdbc query
jdbc query  write a query of how to print the values of any column present in database in reverse order
Sql Query
Sql Query  Is this query work in Db2 or not ? Select * from FORUM LIMIT 2
database Query
database Query  i have to find common columns from two tables fron 2 differnt schemas what query to use? i used intersect but i am not getting how it is comapring two tables from different schema because in query we have
database Query
database Query  i have to find common columns from two tables from 2 different schemas what query to use? i used intersect but i am not getting how it is comparing two tables from different schema because in query we have
sql query
sql query  two tables are emp,loc write a query to display all the emp information whose locname not equal to bangalore
session into a query
session into a query  Hi all this am Sreedhar from Hyderabad i am calling one session variable in mysql query but its not working can any one help me please... here is the query.. $query = 'SELECT * FROM post WHERE post_date <
query problem
query problem  how write query in jsp based on mysql table field? i have employee table it contain designation field, how write query in jsp... to write this query in jsp please anybody help me, and send me that code
HQL query
HQL query  how to select only password based on username using HQL query from login table where uname and paswrd are two column names
SQL Query
SQL Query  Selecting the third highest salary of Employee without using any subquery?   Here is a query: SELECT salary FROM employee ORDER BY salary DESC LIMIT 2,1
query string
query string  on my servlet page i take the values of the field in a variable and that variable is a primary key so on the basis of that i am sorting... servlet page to different servlet jsp page and that i want to do with query string so
need query
need query  hi sir , i am beginner to sql.i need a query so that it can be helpful to my project. i have four tables each containing different fruits with different amounts. i need a query in such a way that when i say some
sql query
query plz help to me
sql query
query plz help to me
Sql Query
Sql Query  Hi M Navjeet Ghai I want to know How to Show A name(Like Navjeet Ghai And Manpreet Singh Sodhi) of employees from a employee table as N.Ghai & M.S.Sodhi by using sql query
sql query
query plz help to me
select query
select query  how to write select query with where clause having multiple variables. example: i want to select the data from DB in which i want to check againest two variable in where cluase. String sql = "select * from
Gopal oracle C Now i need to write a query "which
Query in jsp
Query in jsp  I have one textbox in jsp. when i will write any letter in that textbox i want all values which are starting from that letter in option from database. same as we are getting in google search textbox. Thank
dynamic query
query - SQL
tell me how to write the query in database but not jsp code. thank u
Query on StringTokenizer
Query on StringTokenizer   Sir,I kept my some data in backend using ms-access. for Example my data is like this vijayawada is good city.india is my country.i am raja. when i retrieve this data from backend and keep
the employees. I have written the query: try { Class.forName
query on strings
query on strings  i want to convert JTextField data into string object. I used getText method and stored in ojbect but i want to compare with a database element but it shows some error.   Hi Friend, Try the following
mysql query
with ("jdbc:odbc:excel"). Execute query "select name, address from [Sheet1$]". Here
sql query
sql query  SQL QUERY BROWSER declare @cout00 int declare @cout01 int declare @cout10 int declare @cout11 int declare @c1 float declare @gss float...); this is the query i have written for the table "dpscomp" - station date month
Hibernate SQL Query/Native Query
This tutorial describes Hibernate SQL Query, which is also known as Native Query