JTable in Java Swing
JTable in Java Swing
Home Tutorials Core Java Advanced Java Programms Projects Downloads Contact
Java Programming
Translate
4 3 8 0 0 1
https://javaproglang.blogspot.com/2014/02/jtable-in-java-swing.html 1/4
3/28/2019 JTable in Java Swing
// Demonstrates how to create a simple table with the
// specified number of rows and columns.
Foll
// <applet code=JTableDemo1.class width=350 height=70>
// </applet>
Email address...
import javax.swing.*;
getContentPane().add(tbl);
}
}
C:\>jdk1.4\bin>javac JTableDemo1.java
C:\>jdk1.4\bin>appletviewer JTableDemo1.java
Output
The following example creates a Swing table in which the data to be displayed in a table has been stored in
array. The column array is simply in array of heading to be displayed in each column. The rows are
represented by an arrays because each row itself is an array of data items to be displayed. The table has
been positioned in an applet.
import javax.swing.*;
import java.awt.*;
import java.util.*;
// Add the table column header and the table to the conte
getContentPane().add(table.getTableHeader(), BorderLayout
getContentPane().add(table);
}
}
https://javaproglang.blogspot.com/2014/02/jtable-in-java-swing.html 2/4
3/28/2019 JTable in Java Swing
C:\>jdk1.4\bin>javac JTableDemo2.java
C:\>jdk1.4\bin>java JTableDemo2
Output
Java Swing-II
JOptionPane Class Input Dialog Boxes JSliders
JProgressBars JTables JTabbedPane
JMenu JPopupMenu JToolBar
JFileChooser JScrollBar JScrollPane
JRootPane JTextPane JTree
JSplitPane JDesktopPane JEditorPane
Related Lyrics
Home » Java » Advance Home » Java » Advance Home » Java » Advance Home » Java » Advance
Java » » Swing ... Java » Java Dat ... Java » Java Swi ... Java » » Swing ...
No comments:
Post a Comment
https://javaproglang.blogspot.com/2014/02/jtable-in-java-swing.html 3/4
3/28/2019 JTable in Java Swing
nusratsahib
Follow Advanced Java Programming on Facebook Popular Programs Follow Advanced Java Pro
https://javaproglang.blogspot.com/2014/02/jtable-in-java-swing.html 4/4