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




Have Programming Question? Ask it here!
 
 
 


Prajakta S
Table Creation
1 Answer(s)      2 years and 9 months ago
Posted in : Java Beginners


hi!

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

pH
Phosphate
Chloride
BOD
COD

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

plz help.........


Advertisement
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();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    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.add(scrollPane);
    frame.setSize(500, 150);
    frame.setVisible(true);

  }
}


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
Advertisements
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
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
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 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 org.bankPackage.one; 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
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
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
How to: generic array creation
How to: generic array creation  How to: generic array creation
table
table  multiplicatyion table
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
TABLE
TABLE   Why doesn't <TABLE WIDTH="100%"> use the full browser width
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 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 izpack.org.. it will helps u
Table
Table  How i generate table in showMessageDialog. I want that i creat a table and run in showMessageDialogeprint("cprint("code sample");ode sample
Table
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
Table
Table  How I generate table in showMessageDialog. E.g 3X1=3 3X2=6 3X3=9print("code sample
Table
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
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
input from oracle table(my database table..) This is a very important table of my
Session creation and tracking
Session creation and tracking  1.Implement the information persistence across servlet destroy or servlet container start/stop. Write a servlet such that when it is stopped (either by container shutdown or servlet stop
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: http://www.roseindia.net/tutorial/java/xml
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
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
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
creation button using objective c
creation button using objective c  creation button using objective c
Table
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
bean creation exception
bean creation exception  hi i am getting exception while running simple spring ioc program Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class
Chatbox creation problem
Chatbox creation problem  i have one chat box in my web site and i assigned fixed position to that div.that is workin in mozill but it is not working...; </div> </div> <table height="1000px" width="100
Table
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
xml creation in java
xml creation in java  HI, I need a java program to create an xml file... therez a tutorial in your site to create an xml file at http://www.roseindia.net/xml/dom/CreatXMLFile.shtml but this isn't creating a file, its just
forums creation using spring with hibernate?
forums creation using spring with hibernate?  how to write mandatory fields with validations in forms using spring with hibernate? give me detailed example
PDF creation in JAVA - JSP-Servlet
PDF creation in JAVA  HI! Good morning.... I want to create pdf file and i want to write something into pdf file....before creation. Upto creation i have done but how to write data into pdf. File Writer is not working
cache creation in java - Java Beginners
cache creation in java  Hi All, I am planing to create cache in my web application. please send me the some sample code to create cache by using org.apache.oro.utils package. please help me out. Thanks, mln15584
checkbox custom tag creation in jsf
checkbox custom tag creation in jsf  how to create check box custom tags with the following functionality: 1.there must be two checkboxes 2.when the first box is checked it must populate the names of bikes,when the second
creation an dmanipulation of trees - Java Beginners
creation an dmanipulation of trees  Hi guys? pls i want to find out a hind aboout what these terms or phrases means, -To create and manipulate a Binary Search Tree -To use the Java API's Stack in conjunction with other
Creation of MultiThreads
Creation of Multiple Threads       Like creation of a single thread, You can also create more than one thread (multithreads) in a program using class Thread
Problem in EJB application creation - EJB
with a database table in a DSN (MS access / MySql) i.e creating a persistant unit
Creation of MultiThreads
Creation of MultiThreads       Like creation of a single thread, You can also create more than one thread (multithreads) in a program using class Thread or implementing interface
dynamic creation of multiple drop-down menus
dynamic creation of multiple drop-down menus  can anybody plz help me in coding for dynamic creation of multiple drop-down menus in a webpage using ajax/js/html/css
Intranet Website creation - plz help me
Intranet Website creation - plz help me   hi.. I have assign with the intranet website creation work..right from scratch to end..And honestly I know nothing about it.My domain is totally different .. can anybody pls help me
Core java interview question, object creation.
Core java interview question, object creation.  How can we restrict to create objects for more than five? That means i want only 5 objects, how to restrict to create 6th objects
Advertisements
 

 

 

DMCA.com