Creating JTable using Java Swing
Creating JTable using Java Swing:
https://youtu.be/WmTk0KHy6T0
________________________________________________
How to make JTable
________________________________________________
Instagram
Facebook
Pinterest
Twitter
package Test;
import javax.swing.*;
public class Table {
Table(){
JFrame frame = new JFrame();
String data [][]= {{"Bill","Gates","Microsoft"},
{"Steve","Jobs","Apple"},
{"Elon","Musk","Tesla"}};
String column [] = {"Name","Surname","Company"};
JTable table = new JTable(data,column);
table.setBounds(30,40,200,300);
JScrollPane sp = new JScrollPane(table);
frame.add(sp);
frame.setSize(300,400);
frame.setVisible(true);
}
public static void main(String[] args) {
new Table();
}
}
Dark Hers
YouTube
https://instagram.com/darkhers
https://www.facebook.com/darkhers
TikTok
https://www.tiktok.com/@darkhers
https://www.pinterest.co.uk/darkhers
Comments
Post a Comment