Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- import javax.swing.border.EmptyBorder;
- import javax.swing.JLabel;
- import java.awt.Font;
- import javax.swing.JTextField;
- import javax.swing.JSeparator;
- import javax.swing.JButton;
- import java.awt.Color;
- import javax.swing.SwingConstants;
- @SuppressWarnings("serial")
- public class View extends JFrame {
- private JPanel contentPane;
- private JTextField from2;
- private JTextField from1;
- private JTextField from3;
- private JTextField from4;
- private JTextField to1;
- private JTextField to2;
- private JTextField to3;
- private JTextField to4;
- private JButton btnDoIt;
- private JLabel lblstatus;
- /**
- * Create the frame.
- */
- public View() {
- setResizable(false);
- setTitle("IP Range Generator by M2G");
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- setBounds(100, 100, 433, 300);
- contentPane = new JPanel();
- contentPane.setBackground(Color.DARK_GRAY);
- contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
- setContentPane(contentPane);
- contentPane.setLayout(null);
- JLabel lblFrom = new JLabel("From:");
- lblFrom.setForeground(Color.GREEN);
- lblFrom.setFont(new Font("Tahoma", Font.PLAIN, 12));
- lblFrom.setBounds(27, 24, 46, 14);
- contentPane.add(lblFrom);
- JSeparator separator = new JSeparator();
- separator.setBounds(89, 66, 15, 2);
- contentPane.add(separator);
- JSeparator separator_1 = new JSeparator();
- separator_1.setBounds(198, 66, 15, 2);
- contentPane.add(separator_1);
- JSeparator separator_2 = new JSeparator();
- separator_2.setBounds(311, 66, 15, 2);
- contentPane.add(separator_2);
- JSeparator separator_3 = new JSeparator();
- separator_3.setBounds(89, 136, 15, 2);
- contentPane.add(separator_3);
- JSeparator separator_4 = new JSeparator();
- separator_4.setBounds(198, 136, 15, 2);
- contentPane.add(separator_4);
- JSeparator separator_5 = new JSeparator();
- separator_5.setBounds(311, 136, 15, 2);
- contentPane.add(separator_5);
- from2 = new JTextField();
- from2.setBounds(127, 54, 52, 20);
- contentPane.add(from2);
- from2.setColumns(10);
- from1 = new JTextField();
- from1.setColumns(10);
- from1.setBounds(27, 54, 52, 20);
- contentPane.add(from1);
- from3 = new JTextField();
- from3.setColumns(10);
- from3.setBounds(232, 54, 52, 20);
- contentPane.add(from3);
- from4 = new JTextField();
- from4.setColumns(10);
- from4.setBounds(336, 54, 52, 20);
- contentPane.add(from4);
- to1 = new JTextField();
- to1.setColumns(10);
- to1.setBounds(27, 128, 52, 20);
- contentPane.add(to1);
- to2 = new JTextField();
- to2.setColumns(10);
- to2.setBounds(127, 128, 52, 20);
- contentPane.add(to2);
- to3 = new JTextField();
- to3.setColumns(10);
- to3.setBounds(232, 128, 52, 20);
- contentPane.add(to3);
- to4 = new JTextField();
- to4.setColumns(10);
- to4.setBounds(336, 128, 52, 20);
- contentPane.add(to4);
- JLabel lblTo = new JLabel("To:");
- lblTo.setForeground(Color.GREEN);
- lblTo.setFont(new Font("Tahoma", Font.PLAIN, 12));
- lblTo.setBounds(27, 103, 46, 14);
- contentPane.add(lblTo);
- btnDoIt = new JButton("Do It!");
- btnDoIt.setBounds(127, 181, 157, 31);
- contentPane.add(btnDoIt);
- lblstatus = new JLabel("Ready!");
- lblstatus.setForeground(Color.GREEN);
- lblstatus.setHorizontalAlignment(SwingConstants.CENTER);
- lblstatus.setFont(new Font("Tahoma", Font.PLAIN, 13));
- lblstatus.setBounds(127, 234, 157, 14);
- contentPane.add(lblstatus);
- setVisible(true);
- validate();
- setLocationRelativeTo(null);
- }
- public JTextField getFrom2() {
- return from2;
- }
- public void setFrom2(JTextField from2) {
- this.from2 = from2;
- }
- public JTextField getFrom1() {
- return from1;
- }
- public void setFrom1(JTextField from1) {
- this.from1 = from1;
- }
- public JTextField getFrom3() {
- return from3;
- }
- public void setFrom3(JTextField from3) {
- this.from3 = from3;
- }
- public JTextField getFrom4() {
- return from4;
- }
- public void setFrom4(JTextField from4) {
- this.from4 = from4;
- }
- public JTextField getTo1() {
- return to1;
- }
- public void setTo1(JTextField to1) {
- this.to1 = to1;
- }
- public JTextField getTo2() {
- return to2;
- }
- public void setTo2(JTextField to2) {
- this.to2 = to2;
- }
- public JTextField getTo3() {
- return to3;
- }
- public void setTo3(JTextField to3) {
- this.to3 = to3;
- }
- public JTextField getTo4() {
- return to4;
- }
- public void setTo4(JTextField to4) {
- this.to4 = to4;
- }
- public JButton getBtnDoIt() {
- return btnDoIt;
- }
- public void setBtnDoIt(JButton btnDoIt) {
- this.btnDoIt = btnDoIt;
- }
- public JLabel getLblstatus() {
- return lblstatus;
- }
- public void setLblstatus(String alblstatus) {
- lblstatus.setText(alblstatus);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment