Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lab9;
- import java.awt.BorderLayout;
- import java.awt.HeadlessException;
- import javax.swing.ImageIcon;
- import javax.swing.JButton;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JTextField;
- import javax.swing.JToolBar;
- import com.mysql.jdbc.Statement;
- public class MyFrm extends JFrame{
- private static final long serialVersionUID = 1L;
- private JToolBar tb = new JToolBar();
- private JButton firstButton = new JButton();
- private JButton previousButton = new JButton();
- private JTextField posText = new JTextField();
- private JButton nextButton = new JButton();
- private JButton lastButton = new JButton();
- private JButton addButton = new JButton();
- private JButton editButton = new JButton();
- private JButton deleteButton = new JButton();
- private JButton searchButton = new JButton();
- private JButton saveButton = new JButton();
- private JButton undoButton = new JButton();
- private JLabel lbID= new JLabel("ID");
- private JLabel lblNume = new JLabel("Nume");
- private JLabel lblVarsta = new JLabel("Varsta");
- private JTextField textId = new JTextField();
- private JTextField textNume = new JTextField();
- private JTextField textVarsta = new JTextField();
- public JTextField getTextId() {
- return textId;
- }
- public void setTextId(JTextField textId) {
- this.textId = textId;
- }
- public JTextField getTextNume() {
- return textNume;
- }
- public void setTextNume(JTextField textNume) {
- this.textNume = textNume;
- }
- public JTextField getTextVarsta() {
- return textVarsta;
- }
- public void setTextVarsta(JTextField textVarsta) {
- this.textVarsta = textVarsta;
- }
- public MyFrm(Statement sql) throws HeadlessException
- {
- super("Meniu");
- getContentPane().setLayout(new BorderLayout());
- setSize(450, 300);
- getContentPane().add(tb,BorderLayout.NORTH);
- setDefaultCloseOperation(EXIT_ON_CLOSE);
- setResizable(false);
- firstButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\MoveFirst.png"));
- tb.add(firstButton);
- previousButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\MovePrevious.png"));
- tb.add(previousButton);
- tb.add(posText);
- nextButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\MoveNext.png"));
- tb.add(nextButton);
- lastButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\MoveLast.png"));
- tb.add(lastButton);
- addButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\Add.png"));
- tb.add(addButton);
- editButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\Edit.png"));
- tb.add(editButton);
- deleteButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\Delete.png"));
- tb.add(deleteButton);
- searchButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\find.JPG"));
- tb.add(searchButton);
- saveButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\save.JPG"));
- tb.add(saveButton);
- undoButton.setIcon(new ImageIcon("C:\\Users\\student\\Downloads\\Imagini\\undo.JPG"));
- tb.add(undoButton);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement