Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.EventQueue;
- import javax.swing.ButtonGroup;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JOptionPane;
- import javax.swing.JRadioButton;
- import javax.swing.JTabbedPane;
- import javax.swing.JTable;
- import javax.swing.JTextField;
- import javax.swing.JPasswordField;
- import javax.swing.JMenuBar;
- import javax.swing.JButton;
- import java.awt.event.ActionListener;
- import java.awt.event.ActionEvent;
- import java.awt.CardLayout;
- import java.awt.Color;
- import java.awt.Font;
- import java.awt.SystemColor;
- import org.eclipse.wb.swing.FocusTraversalOnArray;
- import java.awt.Component;
- import javax.swing.JPanel;
- import javax.swing.border.BevelBorder;
- import javax.swing.DropMode;
- import javax.swing.JToggleButton;
- import javax.swing.JComboBox;
- import javax.swing.border.TitledBorder;
- import javax.swing.UIManager;
- import javax.swing.border.LineBorder;
- import javax.swing.border.CompoundBorder;
- import javax.swing.table.DefaultTableModel;
- import javax.swing.JTextPane;
- import javax.swing.JScrollPane;
- public class Database {
- private JFrame frame;
- private JFrame frame1;
- private JTextField textField;
- private JPasswordField passwordField;
- private JPanel panel;
- private CardLayout card;
- private JTextField textField_1;
- private JTextField textField_3;
- private JTextField textField_4;
- private JPasswordField passwordField_1;
- private JTextField textField_2;
- private JTextField textField_5;
- private JTextField textField_6;
- private JTextField textField_7;
- private JTextField textField_8;
- private JTextField textField_9;
- private JTextField textField_10;
- private JTextField textField_11;
- private JTextField textField_12;
- private JTextPane authorList;
- void publisherData(){
- String publisher = textField_8.getText();
- if(publisher==""){
- //messege insert publisher name
- JTextField name= new JTextField();
- int option = JOptionPane.showConfirmDialog(null, name,
- "Publisher name", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- }else{
- String url = "jdbc:mysql://localhost:3306/";
- String user = "root";
- String password = "";
- try{
- /* Class.forName("com.mysql.jdbc.Driver").newInstance();
- Connection con = DriverManager.getConnection(url, user, password);
- Statement stt = con.createStatement();
- stt.execute("USE book_store");
- ResultSet res = stt.executeQuery("SELECT * FROM book WHERE lname = '"+publisher+"'");*/
- // if(!res.next()){
- JTextField address = new JTextField();
- JTextField phone= new JTextField();
- Object[] message = { "address:", address, "phone:", phone };
- int option = JOptionPane.showConfirmDialog(null, message,
- "Publisher", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- // }
- }catch(Exception e){
- }
- }
- }
- /**
- * Launch the application.
- */
- public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- Database window = new Database();
- window.frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- /**
- * Create the application.
- */
- public Database() {
- initialize();
- }
- /**
- * Initialize the contents of the frame.
- */
- private void initialize() {
- frame = new JFrame();
- frame.getContentPane().setForeground(SystemColor.activeCaption);
- frame.getContentPane().setBackground(Color.LIGHT_GRAY);
- frame.getContentPane().setFont(new Font("Tahoma", Font.BOLD, 13));
- frame.setBounds(100, 100, 541, 476);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.getContentPane().setLayout(null);
- /*
- * frame1=new JFrame();
- * frame1.getContentPane().setForeground(SystemColor.activeCaption);
- * frame1.getContentPane().setBackground(Color.LIGHT_GRAY);
- * frame1.getContentPane().setFont(new Font("Tahoma", Font.BOLD, 13));
- * frame1.setBounds(100, 100, 450, 476);
- * frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- * frame1.getContentPane().setLayout(null);
- */
- panel = new JPanel();
- panel.setBounds(0, 0, 544, 430);
- frame.getContentPane().add(panel);
- card = new CardLayout(0, 0);
- panel.setLayout(card);
- JPanel panel_1 = new JPanel();
- panel_1.setBounds(0, 0, 544, 430);
- panel.add(panel_1, "first");
- panel_1.setLayout(null);
- textField = new JTextField();
- textField.setBounds(154, 163, 126, 20);
- panel_1.add(textField);
- textField.setColumns(10);
- JLabel lblUsername = new JLabel("Username");
- lblUsername.setBounds(64, 166, 75, 14);
- lblUsername.setFont(new Font("Tahoma", Font.BOLD, 13));
- lblUsername.setBackground(Color.BLUE);
- panel_1.add(lblUsername);
- JLabel lblPassword = new JLabel("Password");
- lblPassword.setBounds(64, 197, 69, 14);
- lblPassword.setFont(new Font("Tahoma", Font.BOLD, 13));
- panel_1.add(lblPassword);
- passwordField = new JPasswordField();
- passwordField.setBounds(154, 194, 126, 20);
- panel_1.add(passwordField);
- JButton btnLogin = new JButton("login");
- btnLogin.setBounds(154, 249, 89, 23);
- btnLogin.setBackground(Color.ORANGE);
- panel_1.add(btnLogin);
- final JPanel panel_2 = new JPanel();
- panel_2.setBounds(318, 58, 89, 23);
- panel_1.add(panel_2, "second");
- panel_2.setLayout(null);
- JButton btnSignUp = new JButton("sign up");
- btnSignUp.setBounds(0, 0, 89, 23);
- panel_2.add(btnSignUp);
- btnSignUp.setFont(new Font("Tahoma", Font.BOLD, 13));
- btnSignUp.setBackground(Color.WHITE);
- JPanel panel_3 = new JPanel();
- panel_3.setBorder(new BevelBorder(BevelBorder.LOWERED, new Color(255,
- 0, 0), Color.RED, Color.RED, Color.RED));
- panel_3.setBounds(36, 107, 331, 215);
- panel_1.add(panel_3, "third");
- panel_3.setLayout(null);
- JLabel lblNewLabel = new JLabel("Login");
- lblNewLabel.setBounds(149, 24, 46, 14);
- panel_3.add(lblNewLabel);
- JLabel errorMsg = new JLabel("");
- errorMsg.setBounds(85, 117, 197, 14);
- panel_3.add(errorMsg);
- panel.setFocusTraversalPolicy(new FocusTraversalOnArray(
- new Component[] { textField, lblUsername, lblPassword,
- passwordField, btnLogin, btnSignUp }));
- JPanel panel_4 = new JPanel();
- panel_4.setBackground(Color.WHITE);
- panel_4.setBounds(0, 0, 544, 430);
- panel.add(panel_4, "fourth");
- panel_4.setLayout(null);
- JLabel lblSignUp = new JLabel("Sign up");
- lblSignUp.setFont(new Font("Tahoma", Font.BOLD, 14));
- lblSignUp.setBounds(188, 54, 102, 31);
- panel_4.add(lblSignUp);
- textField_1 = new JTextField();
- textField_1.setBounds(150, 122, 154, 20);
- panel_4.add(textField_1);
- textField_1.setColumns(10);
- textField_3 = new JTextField();
- textField_3.setBounds(150, 240, 154, 20);
- panel_4.add(textField_3);
- textField_3.setColumns(10);
- textField_4 = new JTextField();
- textField_4.setBounds(150, 300, 154, 20);
- panel_4.add(textField_4);
- textField_4.setColumns(10);
- JLabel lblUsername_1 = new JLabel("Username");
- lblUsername_1.setBounds(35, 128, 105, 14);
- panel_4.add(lblUsername_1);
- passwordField_1 = new JPasswordField();
- passwordField_1.setBounds(150, 179, 154, 20);
- panel_4.add(passwordField_1);
- JLabel lblPassword_1 = new JLabel("Password");
- lblPassword_1.setBounds(35, 185, 105, 14);
- panel_4.add(lblPassword_1);
- JLabel lblFirstName = new JLabel("First Name");
- lblFirstName.setBounds(35, 246, 105, 14);
- panel_4.add(lblFirstName);
- JLabel lblNewLabel_1 = new JLabel("Last Name");
- lblNewLabel_1.setBounds(35, 306, 105, 14);
- panel_4.add(lblNewLabel_1);
- JButton btnSubmit = new JButton("Register");
- btnSubmit.setBounds(178, 372, 89, 23);
- panel_4.add(btnSubmit);
- JButton btnNewButton = new JButton("Back");
- btnNewButton.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- card.show(panel, "first");
- }
- });
- btnNewButton.setBounds(10, 11, 89, 23);
- panel_4.add(btnNewButton);
- JLabel usernameMsg = new JLabel("");
- usernameMsg.setBounds(150, 151, 236, 14);
- panel_4.add(usernameMsg);
- JLabel passwordMsg = new JLabel("");
- passwordMsg.setBounds(150, 215, 236, 14);
- panel_4.add(passwordMsg);
- JLabel firstnameMsg = new JLabel("");
- firstnameMsg.setBounds(150, 275, 236, 14);
- panel_4.add(firstnameMsg);
- JLabel lastnameMsg = new JLabel("");
- lastnameMsg.setBounds(150, 331, 291, 14);
- panel_4.add(lastnameMsg);
- btnSignUp.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- card.show(panel, "fourth");
- }
- });
- // *************************operations***************************
- JPanel panel_5 = new JPanel();
- panel_5.setBackground(Color.CYAN);
- panel_5.setBounds(0, 0, 424, 419);
- panel.add(panel_5, "operations");
- panel_5.setLayout(null);
- JPanel panel_7 = new JPanel();
- panel_7.setBackground(Color.BLUE);
- panel_7.setBorder(new LineBorder(new Color(0, 0, 0), 4));
- panel_7.setBounds(125, 92, 137, 254);
- panel_5.add(panel_7);
- panel_7.setLayout(null);
- JButton btnNewButton1 = new JButton("add book");
- btnNewButton1.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- card.show(panel, "addbooks");
- }
- });
- btnNewButton1.setBounds(6, 16, 125, 23);
- panel_7.add(btnNewButton1);
- JButton btnNewButton_1 = new JButton("update");
- btnNewButton_1.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- card.show(panel, "search/update");
- }
- });
- btnNewButton_1.setBounds(6, 86, 125, 23);
- panel_7.add(btnNewButton_1);
- JButton btnNewButton_2 = new JButton("confirm order");
- btnNewButton_2.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- card.show(panel, "confirmOrders");
- }
- });
- btnNewButton_2.setBounds(6, 148, 125, 23);
- panel_7.add(btnNewButton_2);
- JButton btnNewButton_3 = new JButton("search");
- btnNewButton_3.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- card.show(panel, "search/update");
- }
- });
- btnNewButton_3.setBounds(6, 216, 125, 23);
- panel_7.add(btnNewButton_3);
- JLabel lblUsersOperations = new JLabel(
- " Users operations");
- lblUsersOperations.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC,
- 14));
- lblUsersOperations.setBounds(45, 50, 363, 39);
- panel_5.add(lblUsersOperations);
- JLabel lblNewLabel_2 = new JLabel("New label");
- lblNewLabel_2.setBounds(10, 11, 150, 28);
- panel_5.add(lblNewLabel_2);
- JButton btnLogout = new JButton("logout");
- btnLogout.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- card.show(panel, "first");
- }
- });
- btnLogout.setBounds(319, 14, 89, 23);
- panel_5.add(btnLogout);
- JPanel panel_8 = new JPanel();
- panel_8.setBounds(50, 50, 10, 10);
- panel.add(panel_8, "confirmOrders");
- panel_8.setLayout(null);
- JButton btnNewButton_4 = new JButton("Back");
- btnNewButton_4.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- card.show(panel, "operations");
- }
- });
- btnNewButton_4.setBounds(10, 11, 89, 23);
- panel_8.add(btnNewButton_4);
- textField_2 = new JTextField();
- textField_2.setBounds(162, 138, 138, 20);
- panel_8.add(textField_2);
- textField_2.setColumns(10);
- JLabel lblNewLabel_3 = new JLabel("Enter ISBN");
- lblNewLabel_3.setBounds(38, 141, 114, 14);
- panel_8.add(lblNewLabel_3);
- JLabel lblNewLabel_4 = new JLabel("Confirm Order");
- lblNewLabel_4.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 13));
- lblNewLabel_4.setBounds(177, 73, 156, 14);
- panel_8.add(lblNewLabel_4);
- JButton btnNewButton_5 = new JButton("Confirm");
- btnNewButton_5.setBounds(177, 207, 89, 23);
- panel_8.add(btnNewButton_5);
- JLabel msg = new JLabel("");
- msg.setBounds(96, 303, 304, 14);
- panel_8.add(msg);
- panel_5.setLayout(null);
- JPanel panel_9 = new JPanel();
- panel_9.setBounds(55, 92, 10, 10);
- panel.add(panel_9, "addbooks");
- panel_9.setLayout(null);
- JButton btnNewButton_6 = new JButton("Back");
- btnNewButton_6.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- card.show(panel, "operations");
- }
- });
- btnNewButton_6.setBounds(0, 11, 89, 23);
- panel_9.add(btnNewButton_6);
- textField_5 = new JTextField();
- textField_5.setBounds(238, 258, 170, 20);
- panel_9.add(textField_5);
- textField_5.setColumns(10);
- textField_6 = new JTextField();
- textField_6.setBounds(21, 92, 170, 20);
- panel_9.add(textField_6);
- textField_6.setColumns(10);
- JLabel lblNewLabel_5 = new JLabel("");
- lblNewLabel_5.setForeground(Color.RED);
- lblNewLabel_5.setBackground(Color.WHITE);
- lblNewLabel_5.setBounds(347, 58, 127, 14);
- panel_9.add(lblNewLabel_5);
- textField_7 = new JTextField();
- textField_7.setBounds(238, 92, 170, 20);
- panel_9.add(textField_7);
- textField_7.setColumns(10);
- textField_8 = new JTextField();
- textField_8.setBounds(21, 148, 170, 20);
- panel_9.add(textField_8);
- textField_8.setColumns(10);
- textField_9 = new JTextField();
- textField_9.setBounds(238, 148, 170, 20);
- panel_9.add(textField_9);
- textField_9.setColumns(10);
- textField_10 = new JTextField();
- textField_10.setBounds(21, 202, 170, 20);
- panel_9.add(textField_10);
- textField_10.setColumns(10);
- textField_11 = new JTextField();
- textField_11.setBounds(238, 202, 170, 20);
- panel_9.add(textField_11);
- textField_11.setColumns(10);
- textField_12 = new JTextField();
- textField_12.setBounds(21, 258, 170, 20);
- panel_9.add(textField_12);
- textField_12.setColumns(10);
- JLabel lblNewLabel_6 = new JLabel("Insert Book");
- lblNewLabel_6.setFont(new Font("Tahoma", Font.BOLD | Font.ITALIC, 14));
- lblNewLabel_6.setBounds(216, 40, 176, 14);
- panel_9.add(lblNewLabel_6);
- JLabel lblNewLabel_7 = new JLabel("Enter ISBN");
- lblNewLabel_7.setBounds(28, 67, 114, 14);
- panel_9.add(lblNewLabel_7);
- JLabel lblNewLabel_8 = new JLabel("Title");
- lblNewLabel_8.setBounds(274, 67, 79, 14);
- panel_9.add(lblNewLabel_8);
- JLabel lblNewLabel_9 = new JLabel("Publisher");
- lblNewLabel_9.setBounds(31, 121, 114, 14);
- panel_9.add(lblNewLabel_9);
- JLabel lblNewLabel_10 = new JLabel("Publication year");
- lblNewLabel_10.setBounds(274, 123, 147, 14);
- panel_9.add(lblNewLabel_10);
- JLabel lblNewLabel_11 = new JLabel("Selling price");
- lblNewLabel_11.setBounds(31, 177, 114, 14);
- panel_9.add(lblNewLabel_11);
- JLabel lblNewLabel_12 = new JLabel("Category");
- lblNewLabel_12.setBounds(274, 179, 114, 14);
- panel_9.add(lblNewLabel_12);
- JLabel lblNewLabel_13 = new JLabel("Copies");
- lblNewLabel_13.setBounds(31, 233, 79, 14);
- panel_9.add(lblNewLabel_13);
- JLabel lblNewLabel_14 = new JLabel("Threshold");
- lblNewLabel_14.setBounds(271, 233, 102, 14);
- panel_9.add(lblNewLabel_14);
- JButton btnNewButton_7 = new JButton("Insert");
- btnNewButton_7.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- publisherData() ;
- }
- });
- btnNewButton_7.setBounds(200, 384, 89, 23);
- panel_9.add(btnNewButton_7);
- authorList = new JTextPane();
- authorList.setEditable(false);
- JScrollPane scrollPane = new JScrollPane();
- scrollPane.setBounds(21, 312, 429, 71);
- panel_9.add(scrollPane);
- scrollPane.setViewportView(authorList);
- JButton btnNewButton_9 = new JButton("insert author");
- btnNewButton_9.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JTextField author = new JTextField();
- int option = JOptionPane.showConfirmDialog(null, author,
- "search", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION
- && !author.getText().equals("")) {
- if (!authorList.getText().equals(""))
- authorList.setText(authorList.getText() + "\n"
- + author.getText());
- else
- authorList.setText(author.getText());
- }
- }
- });
- btnNewButton_9.setBounds(168, 285, 121, 23);
- panel_9.add(btnNewButton_9);
- JPanel panel_6 = new JPanel();
- panel_6.setBounds(0, 0, 432, 419);
- panel.add(panel_6, "search/update");
- btnLogin.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- card.show(panel, "operations");
- }
- });
- panel_6.setLayout(null);
- JLabel lblSearchBy = new JLabel("search by");
- lblSearchBy.setBounds(10, 39, 65, 14);
- panel_6.add(lblSearchBy);
- JRadioButton rdbtnIsbnAndTiltle = new JRadioButton("ISBN and Tiltle");
- rdbtnIsbnAndTiltle.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- JTextField ISBN = new JTextField();
- JTextField Title = new JTextField();
- Object[] message = { "ISBN:", ISBN, "Title:", Title };
- int option = JOptionPane.showConfirmDialog(null, message,
- "search", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- }
- });
- rdbtnIsbnAndTiltle.setBounds(66, 35, 115, 23);
- panel_6.add(rdbtnIsbnAndTiltle);
- JRadioButton rdbtnCategory = new JRadioButton("Category");
- rdbtnCategory.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- JTextField catg = new JTextField();
- int option = JOptionPane.showConfirmDialog(null, catg,
- "search", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- }
- });
- rdbtnCategory.setBounds(178, 35, 83, 23);
- panel_6.add(rdbtnCategory);
- JRadioButton rdbtnAuthor = new JRadioButton("author");
- rdbtnAuthor.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- JTextField author = new JTextField();
- int option = JOptionPane.showConfirmDialog(null, author,
- "search", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- }
- });
- rdbtnAuthor.setBounds(257, 35, 65, 23);
- panel_6.add(rdbtnAuthor);
- JRadioButton rdbtnPublisher = new JRadioButton("publisher");
- rdbtnPublisher.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- JTextField author = new JTextField();
- int option = JOptionPane.showConfirmDialog(null, author,
- "search", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- }
- });
- rdbtnPublisher.setBounds(324, 35, 94, 23);
- panel_6.add(rdbtnPublisher);
- JRadioButton rdbtnCopies = new JRadioButton("copies");
- rdbtnCopies.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- JTextField copy = new JTextField();
- int option = JOptionPane.showConfirmDialog(null, copy,
- "search", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- }
- });
- rdbtnCopies.setBounds(414, 35, 77, 23);
- panel_6.add(rdbtnCopies);
- ButtonGroup group = new ButtonGroup();
- group.add(rdbtnIsbnAndTiltle);
- group.add(rdbtnCategory);
- group.add(rdbtnAuthor);
- group.add(rdbtnPublisher);
- group.add(rdbtnCopies);
- JButton btnNewButton_41 = new JButton("Update");
- btnNewButton_41.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- // check search al 2wl
- // lma y3ml
- JTextField update = new JTextField();
- int option = JOptionPane.showConfirmDialog(null, update,
- "update", JOptionPane.OK_CANCEL_OPTION);
- if (option == JOptionPane.OK_OPTION) {
- }
- }
- });
- btnNewButton_41.setBounds(182, 72, 94, 23);
- panel_6.add(btnNewButton_41);
- btnLogin.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- card.show(panel, "operations");
- }
- });
- JButton btnNewButton_8 = new JButton("back");
- btnNewButton_8.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- card.show(panel, "operations");
- }
- });
- btnNewButton_8.setBounds(0, 5, 89, 23);
- panel_6.add(btnNewButton_8);
- JTable table = new JTable();
- table.setModel(new DefaultTableModel(new Object[][] {
- { "ISBN", "Title", "Publisher", "Year", "Price", "Categ",
- "#Copy", "Threshold" },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null },
- { null, null, null, null, null, null, null, null }, },
- new String[] { "ISBN", "Title", "Publisher", "Year", "Price",
- "Categ", "#Copy", "Threshold" }) {
- boolean[] columnEditables = new boolean[] { false, false, false,
- false, false, false, false, false };
- public boolean isCellEditable(int row, int column) {
- return columnEditables[column];
- }
- });
- table.setBounds(10, 99, 512, 320);
- panel_6.add(table);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement