Untitled


SUBMITTED BY: uname

DATE: Nov. 16, 2016, 8:11 p.m.

FORMAT: Java

SIZE: 2.7 kB

HITS: 559

  1. package sprint1;
  2. import java.awt.EventQueue;
  3. import java.awt.Image;
  4. import javax.swing.JFrame;
  5. import javax.swing.JPanel;
  6. import java.awt.BorderLayout;
  7. import javax.swing.JLabel;
  8. import javax.swing.JTextField;
  9. import javax.swing.JComboBox;
  10. import javax.swing.JButton;
  11. import javax.swing.JCheckBox;
  12. import javax.swing.GroupLayout;
  13. import javax.swing.GroupLayout.Alignment;
  14. import javax.swing.ImageIcon;
  15. import javax.swing.LayoutStyle.ComponentPlacement;
  16. import javax.swing.ScrollPaneLayout;
  17. import javax.imageio.ImageIO;
  18. import javax.swing.DefaultComboBoxModel;
  19. import javax.swing.JScrollPane;
  20. import java.awt.Container;
  21. import java.awt.Cursor;
  22. import java.awt.Dimension;
  23. import java.awt.event.MouseAdapter;
  24. import java.awt.event.MouseEvent;
  25. import java.net.URL;
  26. import java.sql.Connection;
  27. import java.sql.DriverManager;
  28. import java.sql.PreparedStatement;
  29. import java.sql.ResultSet;
  30. import java.text.NumberFormat;
  31. import java.util.ArrayList;
  32. import net.miginfocom.swing.MigLayout;
  33. import java.awt.event.ActionEvent;
  34. import java.awt.event.ActionListener;
  35. import java.awt.event.ComponentAdapter;
  36. import java.awt.event.ComponentEvent;
  37. import javax.swing.JFormattedTextField;
  38. import javax.swing.SwingConstants;
  39. public class WindowMain {
  40. private static JFrame frame;
  41. private static JTextField textField = new JTextField();
  42. static JPanel pnlItems = new JPanel();
  43. static int x = 0;
  44. static MigLayout layout;
  45. static Connection con;
  46. public static ArrayList<String>users = new ArrayList<String>();
  47. public static ArrayList<String>ads = new ArrayList<String>();
  48. static JButton btnAccount = new JButton("Account");
  49. static User login = new User();
  50. static Boolean isLoggedIn = false;
  51. /**
  52. * Launch the application.
  53. */
  54. public static void main(String[] args) {
  55. EventQueue.invokeLater(new Runnable() {
  56. @SuppressWarnings("static-access")
  57. public void run() {
  58. try {
  59. WindowMain window = new WindowMain();
  60. window.frame.setVisible(true);
  61. } catch (Exception e) {
  62. e.printStackTrace();
  63. }
  64. }
  65. });
  66. }
  67. /**
  68. * Create the application.
  69. */
  70. public WindowMain() {
  71. initialize();
  72. }
  73. /**
  74. * Initialize the contents of the frame.
  75. */
  76. private void initialize() {
  77. frame = new JFrame();
  78. frame.setResizable(true);
  79. frame.setTitle("DSSHG");
  80. frame.addComponentListener(new ComponentAdapter() {
  81. @Override
  82. public void componentResized(ComponentEvent arg0) {
  83. }
  84. });

comments powered by Disqus