Table Creation


Table Creation


I want a table which looks like following can u tell me how it can be made with java swings..

YEAR 2005

Jan  Feb      Mar      Apr      May     Jun    July    Aug  Sep


Can u tel me how i am able to make such table?

plz help.........

View Answers

December 2, 2011 at 11:26 AM

import javax.swing.*;

public class CreateJTable {
  public static void main(String args[]) {
    JFrame frame = new JFrame();

    Object rowData[][] = { { "", "", "","","","","","","","","","" },
        { "", "", "","","","","","","","","","" } };
    Object columnNames[] = { "Jan", "Feb", "Mar","Apr","May","June","Jul","Aug","Sep","Oct","Nov","Dec" };
    JTable table = new JTable(rowData, columnNames);

    JScrollPane scrollPane = new JScrollPane(table);
    frame.setSize(500, 150);



Related Tutorials/Questions & Answers:
Table Creation
Table Creation  hi! I want a table which looks like following can... to make such table? plz help.........  ...","Oct","Nov","Dec" }; JTable table = new JTable(rowData, columnNames
Table Creation
Table Creation  create the table for the following fields.its very urgent for me.plz help me S.No,Category( From the home page),Name of the Candidate( After registering and after selecting the category),Age,Title of the project
creation of table using a Java swing
creation of table using a Java swing  how to create a table dynamically in Java swing
Database Table Creation Example with JDBC Batch
Database Table Creation Example with JDBC Batch: In this example, we are discuss about table creation in the database using JDBC Batch process. First...("Database Table Creation Sucessfully.");        // connection committed
how to move records from one table to other based on its creation time
how to move records from one table to other based on its creation time ... to second table based on the record creation time means the records should not be present in first table after creation of two days,and it has to move
Creation and insertion in table
CREATION OF  TABLE,INSERTION &DISPLAY OF DATA  USING SQL QUERY   In this progam we create table in MYSQL using "create"....     Statement statement = null;     // declare a resultset that uses as a table
table  multiplicatyion table
Creation of xml
Creation of xml  Hi, I need to fetch details from my database and to create a xml file containing all those datas...My database datas are in key value pair... AppID Label Value 12345 Applicant name XXXX 12345 Masterno
Creation of methods
Creation of methods  I have a only single class and its having only one method ie., main method only.... i need to develop another method that is to reduce my switching code package; import java.util.Scanner
id creation
id creation  CREATE TABLE mohan2 ( sno bigint(20) NOT NULL AUTO_INCREMENT, name varchar(30) NOT NULL, sal int(30) NOT NULL, eid varchar(30) NOT NULL, PRIMARY KEY (sno,eid) ) import java.sql.*; import
TABLE   Why doesn't <TABLE WIDTH="100%"> use the full browser width
Table  How i generate table in showMessageDialog. I want that i creat a table and run in showMessageDialogeprint("cprint("code sample");ode sample
Table  How I generate table in showMessageDialog. E.g 3X1=3 3X2=6 3X3=9print("code sample
Table  How i generate table in showMessageDialog. I want to creat a table and run in showMessageDialoge. Pl make a table programe which run..., JOptionpane, Integer.parseInt. Please use only these above methods to make table
creation of a form - JSP-Servlet
creation of a form  how to create a question paper using JSP code  Hi Friend, We have taken radiobuttons in our application, you can take textarea, textfield etc. Create a table ans(ques,op1,op2,op3,op4,op5,ans
creation of database - SQL
creation of database  hi, where to and how to execute SQL queries?   Hi nanju mysql>CREATE DATABASE search; mysql> SHOW DATABASES; mysql> USE search mysql>create table Emp (fname VARCHAR(20
input from oracle table(my database table..) This is a very important table of my
table  Hi..I have a list of links which links to a table in the same page.If I click first link the table is displayed at the top, likewise if i click the last link the table is displayed at the last,i dont know how to set
Table  How i generate table in JOptionpane.showMessageDialog... advance coding but i want u make the table using JOptionpane.showMessageDialog, import.javax.swing int Integer.parseInt(). Thats my limit. Pl generata a table
table?  Hi, how could i make a table in javascript, which would look like this: AA CODON Number /1000 Fraction .. (this row... can't figure out, how to construct a table,with two fixed columns, one that reads
Table  Why u dont understand sir?? I want to make a table program which generate a table on showMessageDialog. I have learnt these methods until now... methods to be used. Write a table program which use only and only these above methods
How to: generic array creation
How to: generic array creation  How to: generic array creation
Table  How i create table on showMessageDialog using JOptionpane and Integer.parseInt. No other method to use. Pl make a program which generate 5X1=5 5X2=10 5X3=15   Hi Friend, Try this: import javax.swing.*; import
object creation - Subversion
object creation in Java  In how many ways we can create objects in Java
object creation - Java Beginners
object creation  I need object creation in depth(with stack,pc registers).Any one can provide me if possible with video/audio
creation of installer - Java Magazine
creation of installer  plz tell me how can be create installer for any developed application in java?  visit the following url it will helps u
exe file creation - JDBC
exe file creation   hi i have done a project in java swings.project name is format migrator.means db migrator. now my aim is create EXE FILE for my project. pls do consider
creation button using objective c
creation button using objective c  creation button using objective c
XSD Creation. - WebSevices
XSD Creation.  When I try to generate xsd from java object. It is generating XSD file finely. But the problem is it isgenerating XSD file elements in alphabetical order. can u please sujest me how can we do that one. I tried
Random Creation of password
Random Creation of password  Dear Sir I have created a form with some details in it.When clicking on the submit button it gives me a password .....Details and the password is saved in the database....The password has
xml file creation in java
xml file creation in java  how to create xml file in java so that input should not be given from keyboard. and that file should be stored.   Please visit the following links: