Advertisement
Guest User

Untitled

a guest
Jun 6th, 2020
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.87 KB | None | 0 0
  1. import java.awt.EventQueue;
  2.  
  3. import javax.swing.JFrame;
  4. import javax.swing.JButton;
  5. import java.awt.BorderLayout;
  6. import javax.swing.JLabel;
  7. import java.awt.Color;
  8. import java.awt.GridLayout;
  9. import java.awt.Image;
  10. import java.awt.Toolkit;
  11.  
  12. import javax.swing.JTextField;
  13. import java.awt.FlowLayout;
  14. import javax.swing.ImageIcon;
  15. import javax.swing.JProgressBar;
  16. import javax.swing.JSeparator;
  17. import javax.swing.JSpinner;
  18. import java.awt.Component;
  19. import java.awt.Desktop;
  20.  
  21. import javax.swing.Box;
  22. import javax.swing.Icon;
  23.  
  24. import java.awt.Dimension;
  25. import java.awt.Font;
  26. import javax.swing.JTabbedPane;
  27. import javax.swing.JCheckBox;
  28. import javax.swing.JPanel;
  29. import java.awt.event.ActionListener;
  30. import java.net.URI;
  31. import java.awt.event.ActionEvent;
  32. import javax.swing.SwingConstants;
  33. import javax.swing.border.BevelBorder;
  34. import javax.swing.border.LineBorder;
  35. import java.awt.SystemColor;
  36. import javax.swing.UIManager;
  37. import javax.swing.border.EtchedBorder;
  38. import javax.swing.border.SoftBevelBorder;
  39. import javax.swing.JList;
  40. import javax.swing.JToggleButton;
  41. import javax.swing.JEditorPane;
  42. import javax.swing.DropMode;
  43. import java.awt.Label;
  44. import javax.swing.JLayeredPane;
  45. import javax.swing.AbstractAction;
  46. import javax.swing.Action;
  47.  
  48. public class NotiferMenu {
  49.  
  50. private JFrame frame;
  51. private JTextField inpt_rate;
  52. private final Action action = new SwingAction();
  53.  
  54. /**
  55. * Launch the application.
  56. */
  57. public static void main(String[] args) {
  58. EventQueue.invokeLater(new Runnable() {
  59. public void run() {
  60. try {
  61. NotiferMenu window = new NotiferMenu();
  62. window.frame.setVisible(true);
  63. } catch (Exception e) {
  64. e.printStackTrace();
  65. }
  66. }
  67. });
  68. }
  69.  
  70.  
  71.  
  72. /**
  73. * Create a menu and GmodStore instance.
  74. */
  75. public NotiferMenu() {
  76. initialize();
  77. }
  78.  
  79. /**
  80. * Initialize the contents of the frame.
  81. */
  82. private void initialize() {
  83. WebScrape w = new WebScrape();
  84. w.getLatestInfo();
  85. Image icon = Toolkit.getDefaultToolkit().getImage("src\\Images/icon.png");
  86.  
  87. frame = new JFrame();
  88. frame.getContentPane().setBackground(SystemColor.menu);
  89. frame.setBounds(100, 100, 1072, 683);
  90. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  91. frame.getContentPane().setLayout(null);
  92. frame.setTitle("GmodStore Job Notifier");
  93. frame.setIconImage(icon);
  94.  
  95.  
  96. JLabel logo = new JLabel("");
  97. logo.setIcon(new ImageIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/main.png")).getImage().getScaledInstance(125, 125, Image.SCALE_SMOOTH)));
  98. logo.setBounds(10, 10, 125, 125);
  99. frame.getContentPane().add(logo);
  100.  
  101. JSeparator logo_sep_vert = new JSeparator();
  102. logo_sep_vert.setOrientation(SwingConstants.VERTICAL);
  103. logo_sep_vert.setBounds(145, 10, 15, 626);
  104. frame.getContentPane().add(logo_sep_vert);
  105.  
  106. JSeparator logosep = new JSeparator();
  107. logosep.setBounds(10, 145, 136, 10);
  108. frame.getContentPane().add(logosep);
  109.  
  110. JPanel panel = new JPanel();
  111. panel.setBackground(SystemColor.inactiveCaptionBorder);
  112. panel.setBorder(new LineBorder(new Color(153, 180, 209), 2, true));
  113. panel.setBounds(10, 155, 125, 480);
  114. frame.getContentPane().add(panel);
  115. panel.setLayout(null);
  116.  
  117. JLabel lblSettings = new JLabel("Settings");
  118. lblSettings.setBounds(18, 7, 88, 24);
  119. lblSettings.setLabelFor(frame);
  120. lblSettings.setFont(new Font("Arial Rounded MT Bold", Font.BOLD, 20));
  121. lblSettings.setToolTipText("Modify the program's options here!");
  122. panel.add(lblSettings);
  123.  
  124. JSeparator refresh_sep = new JSeparator();
  125. refresh_sep.setBounds(16, 79, 90, 2);
  126. panel.add(refresh_sep);
  127.  
  128. JCheckBox enbl_autorefresh = new JCheckBox("Auto Refresh");
  129. enbl_autorefresh.setFont(new Font("Tahoma", Font.PLAIN, 8));
  130. enbl_autorefresh.setBackground(SystemColor.inactiveCaptionBorder);
  131. enbl_autorefresh.setSelected(true);
  132. enbl_autorefresh.setToolTipText("Scan the GmodStore for jobs automatically?");
  133. enbl_autorefresh.setBounds(10, 87, 95, 21);
  134. panel.add(enbl_autorefresh);
  135.  
  136. inpt_rate = new JTextField();
  137. inpt_rate.setToolTipText("How often should new jobs be looked for? (seconds)");
  138. inpt_rate.setText("300");
  139. inpt_rate.setBounds(10, 130, 96, 19);
  140. panel.add(inpt_rate);
  141. inpt_rate.setColumns(10);
  142.  
  143. JLabel lblSearchRate = new JLabel("Refresh Rate:");
  144. lblSearchRate.setFont(new Font("Tahoma", Font.PLAIN, 12));
  145. lblSearchRate.setBounds(10, 114, 72, 15);
  146. panel.add(lblSearchRate);
  147.  
  148. JLabel lblRefreshSettings = new JLabel("Refreshing");
  149. lblRefreshSettings.setFont(new Font("Arial", Font.BOLD, 12));
  150. lblRefreshSettings.setBounds(29, 62, 72, 14);
  151. panel.add(lblRefreshSettings);
  152.  
  153. JLabel lblNotifcations = new JLabel("Notifcations");
  154. lblNotifcations.setFont(new Font("Arial", Font.BOLD, 12));
  155. lblNotifcations.setBounds(25, 182, 72, 14);
  156. panel.add(lblNotifcations);
  157.  
  158. JSeparator notif_sep = new JSeparator();
  159. notif_sep.setBounds(15, 199, 90, 2);
  160. panel.add(notif_sep);
  161.  
  162. JCheckBox enbl_notif = new JCheckBox("Popup Alerts");
  163. enbl_notif.setFont(new Font("Tahoma", Font.PLAIN, 8));
  164. enbl_notif.setToolTipText("Enable pop up alerts?");
  165. enbl_notif.setSelected(true);
  166. enbl_notif.setBackground(SystemColor.inactiveCaptionBorder);
  167. enbl_notif.setBounds(10, 207, 109, 21);
  168. panel.add(enbl_notif);
  169.  
  170. JLabel lblLogs = new JLabel("Logs");
  171. lblLogs.setFont(new Font("Arial", Font.BOLD, 12));
  172. lblLogs.setBounds(46, 270, 34, 14);
  173. panel.add(lblLogs);
  174.  
  175. JSeparator logs_sep = new JSeparator();
  176. logs_sep.setBounds(16, 287, 90, 2);
  177. panel.add(logs_sep);
  178.  
  179. JCheckBox enbl_loglatest = new JCheckBox("Latest offer");
  180. enbl_loglatest.setToolTipText("Log latest job offer?");
  181. enbl_loglatest.setSelected(true);
  182. enbl_loglatest.setFont(new Font("Tahoma", Font.PLAIN, 8));
  183. enbl_loglatest.setBackground(SystemColor.inactiveCaptionBorder);
  184. enbl_loglatest.setBounds(10, 295, 109, 21);
  185. panel.add(enbl_loglatest);
  186.  
  187. JCheckBox enbl_logrefresh = new JCheckBox("Last refresh");
  188. enbl_logrefresh.setToolTipText("Log when last refreshed?");
  189. enbl_logrefresh.setSelected(true);
  190. enbl_logrefresh.setFont(new Font("Tahoma", Font.PLAIN, 8));
  191. enbl_logrefresh.setBackground(SystemColor.inactiveCaptionBorder);
  192. enbl_logrefresh.setBounds(10, 318, 109, 21);
  193. panel.add(enbl_logrefresh);
  194.  
  195. JCheckBox enbl_logactions = new JCheckBox("Manual actions");
  196. enbl_logactions.setToolTipText("Log manual actions? (play, stop, pause)");
  197. enbl_logactions.setSelected(true);
  198. enbl_logactions.setFont(new Font("Tahoma", Font.PLAIN, 8));
  199. enbl_logactions.setBackground(SystemColor.inactiveCaptionBorder);
  200. enbl_logactions.setBounds(10, 340, 109, 21);
  201. panel.add(enbl_logactions);
  202.  
  203. JLabel lblCredits = new JLabel("Credits");
  204. lblCredits.setToolTipText("Created by Anthony DeArmas");
  205. lblCredits.setBackground(SystemColor.inactiveCaption);
  206. lblCredits.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 15));
  207. lblCredits.setBounds(35, 452, 53, 18);
  208. panel.add(lblCredits);
  209.  
  210. JSeparator credits_sep = new JSeparator();
  211. credits_sep.setForeground(SystemColor.activeCaption);
  212. credits_sep.setBackground(SystemColor.activeCaption);
  213. credits_sep.setBounds(2, 440, 121, 2);
  214. panel.add(credits_sep);
  215.  
  216. JCheckBox enbl_pushnotifs = new JCheckBox("Push noitifcations");
  217. enbl_pushnotifs.setToolTipText("Enable push notications for when you are not at the computer?");
  218. enbl_pushnotifs.setSelected(true);
  219. enbl_pushnotifs.setFont(new Font("Tahoma", Font.PLAIN, 8));
  220. enbl_pushnotifs.setBackground(SystemColor.inactiveCaptionBorder);
  221. enbl_pushnotifs.setBounds(10, 230, 109, 21);
  222. panel.add(enbl_pushnotifs);
  223.  
  224. JPanel main_panel = new JPanel();
  225. main_panel.setBorder(new LineBorder(SystemColor.activeCaption, 2, true));
  226. main_panel.setBackground(SystemColor.inactiveCaptionBorder);
  227. main_panel.setBounds(167, 10, 869, 626);
  228. frame.getContentPane().add(main_panel);
  229. main_panel.setLayout(null);
  230.  
  231. JLabel lblNewLabel = new JLabel("Status: ");
  232. lblNewLabel.setFont(new Font("Arial Rounded MT Bold", Font.BOLD | Font.ITALIC, 72));
  233. lblNewLabel.setBounds(34, 25, 308, 85);
  234. main_panel.add(lblNewLabel);
  235.  
  236. JSeparator separator_1 = new JSeparator();
  237. separator_1.setBounds(10, 134, 849, 8);
  238. main_panel.add(separator_1);
  239.  
  240. JButton bttn_run = new JButton("");
  241. bttn_run.setToolTipText("Run the program");
  242. bttn_run.setIcon(new ImageIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icon_play.png")).getImage().getScaledInstance(25, 25, Image.SCALE_SMOOTH)));
  243. bttn_run.addActionListener(new ActionListener() {
  244. public void actionPerformed(ActionEvent e) {
  245. }
  246. });
  247. bttn_run.setFont(new Font("Arial", Font.BOLD, 25));
  248. bttn_run.setForeground(new Color(50, 205, 50));
  249. bttn_run.setBackground(UIManager.getColor("activeCaption"));
  250. bttn_run.setBounds(623, 140, 72, 39);
  251. main_panel.add(bttn_run);
  252.  
  253. JButton bttn_stop = new JButton("");
  254. bttn_stop.setToolTipText("Stop the program");
  255. bttn_stop.setIcon(new ImageIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icon_stop.png")).getImage().getScaledInstance(25, 25, Image.SCALE_SMOOTH)));
  256. bttn_stop.setForeground(new Color(255, 0, 0));
  257. bttn_stop.setFont(new Font("Arial", Font.BOLD, 25));
  258. bttn_stop.setBackground(UIManager.getColor("activeCaption"));
  259. bttn_stop.setBounds(705, 140, 72, 39);
  260. main_panel.add(bttn_stop);
  261.  
  262. JButton bttn_pause = new JButton("");
  263. bttn_pause.setToolTipText("Pause the program");
  264. bttn_pause.setIcon(new ImageIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icon_pause.png")).getImage().getScaledInstance(25, 25, Image.SCALE_SMOOTH)));
  265. bttn_pause.addActionListener(new ActionListener() {
  266. public void actionPerformed(ActionEvent e) {
  267. }
  268. });
  269. bttn_pause.setForeground(Color.ORANGE);
  270. bttn_pause.setFont(new Font("Arial", Font.BOLD, 25));
  271. bttn_pause.setBackground(UIManager.getColor("activeCaption"));
  272. bttn_pause.setBounds(787, 140, 72, 39);
  273. main_panel.add(bttn_pause);
  274.  
  275. JProgressBar progressBar = new JProgressBar();
  276. progressBar.setBackground(SystemColor.activeCaptionBorder);
  277. progressBar.setValue(25);
  278. progressBar.setForeground(new Color(100, 149, 237));
  279. progressBar.setToolTipText("Displays the time until next refresh");
  280. progressBar.setBounds(10, 141, 603, 38);
  281. main_panel.add(progressBar);
  282.  
  283. JPanel panel_latestjob = new JPanel();
  284. panel_latestjob.setBorder(new LineBorder(SystemColor.activeCaption, 1, true));
  285. panel_latestjob.setBounds(10, 189, 278, 253);
  286. main_panel.add(panel_latestjob);
  287. panel_latestjob.setLayout(null);
  288.  
  289. JLabel lblLatestJobOffering = new JLabel("Latest Job Offer");
  290. lblLatestJobOffering.setFont(new Font("Arial", Font.BOLD, 20));
  291. lblLatestJobOffering.setBounds(55, 10, 189, 24);
  292. panel_latestjob.add(lblLatestJobOffering);
  293.  
  294. JSeparator latestjob_sep = new JSeparator();
  295. latestjob_sep.setBounds(23, 36, 218, 2);
  296. panel_latestjob.add(latestjob_sep);
  297.  
  298. String latestjob_name_pretty = w.LatestJobInfo[0];
  299. if (latestjob_name_pretty.length() >= 32) latestjob_name_pretty = latestjob_name_pretty.subSequence(0, 27) + "...";
  300. JLabel lbl_latestname = new JLabel("Job Name:" + latestjob_name_pretty);
  301. lbl_latestname.setFont(new Font("Arial", Font.PLAIN, 14));
  302. lbl_latestname.setBounds(23, 48, 218, 19);
  303. if (latestjob_name_pretty.length() >= 18) lbl_latestname.setToolTipText(w.LatestJobInfo[0]);
  304. panel_latestjob.add(lbl_latestname);
  305.  
  306. JLabel lbl_latestbudget = new JLabel("Budget: " + w.LatestJobInfo[1]);
  307. lbl_latestbudget.setFont(new Font("Arial", Font.PLAIN, 14));
  308. lbl_latestbudget.setBounds(23, 77, 218, 19);
  309. panel_latestjob.add(lbl_latestbudget);
  310.  
  311. JButton btn_gotolatest = new JButton("Visit Latest Job");
  312. btn_gotolatest.addActionListener(new ActionListener() {
  313. public void actionPerformed(ActionEvent e) {
  314. w.OpenJob(w.getLatestID());
  315. }
  316. });
  317. btn_gotolatest.setAction(action);
  318. btn_gotolatest.setText("Visit Latest Job");
  319. btn_gotolatest.setBackground(UIManager.getColor("Button.highlight"));
  320. btn_gotolatest.setToolTipText("Open the job in a new tab");
  321. btn_gotolatest.setFont(new Font("Arial", Font.BOLD, 12));
  322. btn_gotolatest.setBounds(10, 222, 258, 21);
  323. panel_latestjob.add(btn_gotolatest);
  324.  
  325. JLabel lbl_latestduedate = new JLabel("Due Date: " + w.LatestJobInfo[2]);
  326. lbl_latestduedate.setFont(new Font("Arial", Font.PLAIN, 14));
  327. lbl_latestduedate.setBounds(23, 106, 221, 19);
  328. panel_latestjob.add(lbl_latestduedate);
  329.  
  330. JLabel lbl_latestcat = new JLabel("Category: " + w.LatestJobInfo[3]);
  331. lbl_latestcat.setFont(new Font("Arial", Font.PLAIN, 14));
  332. lbl_latestcat.setBounds(23, 135, 221, 19);
  333. panel_latestjob.add(lbl_latestcat);
  334.  
  335. JLabel lbl_latestapplicants = new JLabel("Applicants: " + w.LatestJobInfo[4]);
  336. lbl_latestapplicants.setFont(new Font("Arial", Font.PLAIN, 14));
  337. lbl_latestapplicants.setBounds(23, 164, 221, 19);
  338. panel_latestjob.add(lbl_latestapplicants);
  339.  
  340. JLabel lbl_latestviews = new JLabel("Views: " + w.LatestJobInfo[5]);
  341. lbl_latestviews.setFont(new Font("Arial", Font.PLAIN, 14));
  342. lbl_latestviews.setBounds(23, 193, 221, 19);
  343. panel_latestjob.add(lbl_latestviews);
  344.  
  345. JPanel panel_joblistings = new JPanel();
  346. panel_joblistings.setBorder(new LineBorder(new Color(153, 180, 209), 1, true));
  347. panel_joblistings.setBounds(298, 189, 561, 427);
  348. main_panel.add(panel_joblistings);
  349. panel_joblistings.setLayout(null);
  350.  
  351. JLabel lblLatestJobListing = new JLabel("Latest Job Listing");
  352. lblLatestJobListing.setFont(new Font("Arial", Font.BOLD, 20));
  353. lblLatestJobListing.setBounds(185, 10, 189, 24);
  354. panel_joblistings.add(lblLatestJobListing);
  355.  
  356. JSeparator latestlistings_sep = new JSeparator();
  357. latestlistings_sep.setBounds(30, 36, 507, 2);
  358. panel_joblistings.add(latestlistings_sep);
  359.  
  360.  
  361. JPanel job = new JPanel();
  362. job.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
  363. job.setBounds(30, 60, 163, 172);
  364. panel_joblistings.add(job);
  365. job.setLayout(null);
  366.  
  367. JButton bttn_visit_job = new JButton("Visit");
  368. bttn_visit_job.setFont(new Font("Arial", Font.PLAIN, 16));
  369. bttn_visit_job.addActionListener(new ActionListener() {
  370. public void actionPerformed(ActionEvent e) {
  371. w.OpenJob(w.getLatestID() - 1);
  372. }
  373. });
  374. bttn_visit_job.setText("Visit");
  375. bttn_visit_job.setBounds(10, 145, 143, 21);
  376. job.add(bttn_visit_job);
  377.  
  378. JLabel lbl_name_job = new JLabel("Job Name:" + w.getJobName(w.getLatestID() - 1));
  379. lbl_name_job.setFont(new Font("Arial", Font.PLAIN, 12));
  380. lbl_name_job.setBounds(10, 10, 143, 13);
  381. job.add(lbl_name_job);
  382.  
  383. JLabel lbl_budget_job = new JLabel("Budget:" + w.getJobBudget(w.getLatestID() - 1));
  384. lbl_budget_job.setFont(new Font("Arial", Font.PLAIN, 12));
  385. lbl_budget_job.setBounds(10, 33, 143, 13);
  386. job.add(lbl_budget_job);
  387.  
  388. JLabel lbl_duedate_job = new JLabel("Due Date:" + w.getJobDate(w.getLatestID() - 1));
  389. lbl_duedate_job.setFont(new Font("Arial", Font.PLAIN, 12));
  390. lbl_duedate_job.setBounds(10, 56, 143, 13);
  391. job.add(lbl_duedate_job);
  392.  
  393. JLabel lbl_category_job = new JLabel("Category:" + w.getJobCategory(w.getLatestID() - 1));
  394. lbl_category_job.setFont(new Font("Arial", Font.PLAIN, 12));
  395. lbl_category_job.setBounds(10, 79, 143, 13);
  396. job.add(lbl_category_job);
  397.  
  398. JLabel lbl_applicants_job = new JLabel("Applicants:" + w.getJobApplicants(w.getLatestID() - 1));
  399. lbl_applicants_job.setFont(new Font("Arial", Font.PLAIN, 12));
  400. lbl_applicants_job.setBounds(10, 102, 143, 13);
  401. job.add(lbl_applicants_job);
  402.  
  403. JLabel lbl_visit_job = new JLabel("Views:" + w.getJobViews(w.getLatestID() - 1));
  404. lbl_visit_job.setFont(new Font("Arial", Font.PLAIN, 12));
  405. lbl_visit_job.setBounds(10, 125, 143, 13);
  406. job.add(lbl_visit_job);
  407.  
  408. JPanel job_1 = new JPanel();
  409. job_1.setLayout(null);
  410. job_1.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
  411. job_1.setBounds(203, 60, 163, 172);
  412. panel_joblistings.add(job_1);
  413.  
  414. JButton bttn_visit_job_1 = new JButton("Visit");
  415. bttn_visit_job_1.setFont(new Font("Arial", Font.PLAIN, 16));
  416. bttn_visit_job_1.setBounds(10, 145, 143, 21);
  417. job_1.add(bttn_visit_job_1);
  418.  
  419. JLabel lbl_name_job_1 = new JLabel("Job Name:" + w.getJobName(w.getLatestID() - 2));
  420. lbl_name_job_1.setFont(new Font("Arial", Font.PLAIN, 12));
  421. lbl_name_job_1.setBounds(10, 10, 143, 13);
  422. job_1.add(lbl_name_job_1);
  423.  
  424. JLabel lbl_budget_job_1 = new JLabel("Budget:" + w.getJobBudget(w.getLatestID() - 2));
  425. lbl_budget_job_1.setFont(new Font("Arial", Font.PLAIN, 12));
  426. lbl_budget_job_1.setBounds(10, 33, 143, 13);
  427. job_1.add(lbl_budget_job_1);
  428.  
  429. JLabel lbl_duedate_job_1 = new JLabel("Due Date:" + w.getJobDate(w.getLatestID() - 2));
  430. lbl_duedate_job_1.setFont(new Font("Arial", Font.PLAIN, 12));
  431. lbl_duedate_job_1.setBounds(10, 56, 143, 13);
  432. job_1.add(lbl_duedate_job_1);
  433.  
  434. JLabel lbl_category_job_1 = new JLabel("Category:" + w.getJobCategory(w.getLatestID() - 2));
  435. lbl_category_job_1.setFont(new Font("Arial", Font.PLAIN, 12));
  436. lbl_category_job_1.setBounds(10, 79, 143, 13);
  437. job_1.add(lbl_category_job_1);
  438.  
  439. JLabel lbl_applicants_job_1 = new JLabel("Applicants:" + w.getJobApplicants(w.getLatestID() - 2));
  440. lbl_applicants_job_1.setFont(new Font("Arial", Font.PLAIN, 12));
  441. lbl_applicants_job_1.setBounds(10, 102, 143, 13);
  442. job_1.add(lbl_applicants_job_1);
  443.  
  444. JLabel lbl_visit_job_1 = new JLabel("Views:" + w.getJobViews(w.getLatestID() - 2));
  445. lbl_visit_job_1.setFont(new Font("Arial", Font.PLAIN, 12));
  446. lbl_visit_job_1.setBounds(10, 125, 143, 13);
  447. job_1.add(lbl_visit_job_1);
  448.  
  449. JPanel job_2 = new JPanel();
  450. job_2.setLayout(null);
  451. job_2.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
  452. job_2.setBounds(376, 60, 163, 172);
  453. panel_joblistings.add(job_2);
  454.  
  455. JButton bttn_visit_job_2 = new JButton("Visit");
  456. bttn_visit_job_2.setFont(new Font("Arial", Font.PLAIN, 16));
  457. bttn_visit_job_2.setBounds(10, 145, 143, 21);
  458. job_2.add(bttn_visit_job_2);
  459.  
  460. JLabel lbl_name_job_2 = new JLabel("Job Name:");
  461. lbl_name_job_2.setFont(new Font("Arial", Font.PLAIN, 12));
  462. lbl_name_job_2.setBounds(10, 10, 143, 13);
  463. job_2.add(lbl_name_job_2);
  464.  
  465. JLabel lbl_budget_job_2 = new JLabel("Budget:");
  466. lbl_budget_job_2.setFont(new Font("Arial", Font.PLAIN, 12));
  467. lbl_budget_job_2.setBounds(10, 33, 143, 13);
  468. job_2.add(lbl_budget_job_2);
  469.  
  470. JLabel lbl_duedate_job_2 = new JLabel("Due Date:");
  471. lbl_duedate_job_2.setFont(new Font("Arial", Font.PLAIN, 12));
  472. lbl_duedate_job_2.setBounds(10, 56, 143, 13);
  473. job_2.add(lbl_duedate_job_2);
  474.  
  475. JLabel lbl_category_job_2 = new JLabel("Category:");
  476. lbl_category_job_2.setFont(new Font("Arial", Font.PLAIN, 12));
  477. lbl_category_job_2.setBounds(10, 79, 143, 13);
  478. job_2.add(lbl_category_job_2);
  479.  
  480. JLabel lbl_applicants_job_2 = new JLabel("Applicants:");
  481. lbl_applicants_job_2.setFont(new Font("Arial", Font.PLAIN, 12));
  482. lbl_applicants_job_2.setBounds(10, 102, 143, 13);
  483. job_2.add(lbl_applicants_job_2);
  484.  
  485. JLabel lbl_visit_job_2 = new JLabel("Views:");
  486. lbl_visit_job_2.setFont(new Font("Arial", Font.PLAIN, 12));
  487. lbl_visit_job_2.setBounds(10, 125, 143, 13);
  488. job_2.add(lbl_visit_job_2);
  489.  
  490. JPanel job_3 = new JPanel();
  491. job_3.setLayout(null);
  492. job_3.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
  493. job_3.setBounds(30, 242, 163, 172);
  494. panel_joblistings.add(job_3);
  495.  
  496. JButton bttn_visit_job_3 = new JButton("Visit");
  497. bttn_visit_job_3.setFont(new Font("Arial", Font.PLAIN, 16));
  498. bttn_visit_job_3.setBounds(10, 145, 143, 21);
  499. job_3.add(bttn_visit_job_3);
  500.  
  501. JLabel lbl_name_job_3 = new JLabel("Job Name:");
  502. lbl_name_job_3.setFont(new Font("Arial", Font.PLAIN, 12));
  503. lbl_name_job_3.setBounds(10, 10, 143, 13);
  504. job_3.add(lbl_name_job_3);
  505.  
  506. JLabel lbl_budget_job_3 = new JLabel("Budget:");
  507. lbl_budget_job_3.setFont(new Font("Arial", Font.PLAIN, 12));
  508. lbl_budget_job_3.setBounds(10, 33, 143, 13);
  509. job_3.add(lbl_budget_job_3);
  510.  
  511. JLabel lbl_duedate_job_3 = new JLabel("Due Date:");
  512. lbl_duedate_job_3.setFont(new Font("Arial", Font.PLAIN, 12));
  513. lbl_duedate_job_3.setBounds(10, 56, 143, 13);
  514. job_3.add(lbl_duedate_job_3);
  515.  
  516. JLabel lbl_category_job_3 = new JLabel("Category:");
  517. lbl_category_job_3.setFont(new Font("Arial", Font.PLAIN, 12));
  518. lbl_category_job_3.setBounds(10, 79, 143, 13);
  519. job_3.add(lbl_category_job_3);
  520.  
  521. JLabel lbl_applicants_job_3 = new JLabel("Applicants:");
  522. lbl_applicants_job_3.setFont(new Font("Arial", Font.PLAIN, 12));
  523. lbl_applicants_job_3.setBounds(10, 102, 143, 13);
  524. job_3.add(lbl_applicants_job_3);
  525.  
  526. JLabel lbl_visit_job_3 = new JLabel("Views:");
  527. lbl_visit_job_3.setFont(new Font("Arial", Font.PLAIN, 12));
  528. lbl_visit_job_3.setBounds(10, 125, 143, 13);
  529. job_3.add(lbl_visit_job_3);
  530.  
  531. JPanel job_4 = new JPanel();
  532. job_4.setLayout(null);
  533. job_4.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
  534. job_4.setBounds(203, 242, 163, 172);
  535. panel_joblistings.add(job_4);
  536.  
  537. JButton bttn_visit_job_4 = new JButton("Visit");
  538. bttn_visit_job_4.setFont(new Font("Arial", Font.PLAIN, 16));
  539. bttn_visit_job_4.setBounds(10, 145, 143, 21);
  540. job_4.add(bttn_visit_job_4);
  541.  
  542. JLabel lbl_name_job_4 = new JLabel("Job Name:");
  543. lbl_name_job_4.setFont(new Font("Arial", Font.PLAIN, 12));
  544. lbl_name_job_4.setBounds(10, 10, 143, 13);
  545. job_4.add(lbl_name_job_4);
  546.  
  547. JLabel lbl_budget_job_4 = new JLabel("Budget:");
  548. lbl_budget_job_4.setFont(new Font("Arial", Font.PLAIN, 12));
  549. lbl_budget_job_4.setBounds(10, 33, 143, 13);
  550. job_4.add(lbl_budget_job_4);
  551.  
  552. JLabel lbl_duedate_job_4 = new JLabel("Due Date:");
  553. lbl_duedate_job_4.setFont(new Font("Arial", Font.PLAIN, 12));
  554. lbl_duedate_job_4.setBounds(10, 56, 143, 13);
  555. job_4.add(lbl_duedate_job_4);
  556.  
  557. JLabel lbl_category_job_4 = new JLabel("Category:");
  558. lbl_category_job_4.setFont(new Font("Arial", Font.PLAIN, 12));
  559. lbl_category_job_4.setBounds(10, 79, 143, 13);
  560. job_4.add(lbl_category_job_4);
  561.  
  562. JLabel lbl_applicants_job_4 = new JLabel("Applicants:");
  563. lbl_applicants_job_4.setFont(new Font("Arial", Font.PLAIN, 12));
  564. lbl_applicants_job_4.setBounds(10, 102, 143, 13);
  565. job_4.add(lbl_applicants_job_4);
  566.  
  567. JLabel lbl_visit_job_4 = new JLabel("Views:");
  568. lbl_visit_job_4.setFont(new Font("Arial", Font.PLAIN, 12));
  569. lbl_visit_job_4.setBounds(10, 125, 143, 13);
  570. job_4.add(lbl_visit_job_4);
  571.  
  572. JPanel job_5 = new JPanel();
  573. job_5.setLayout(null);
  574. job_5.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
  575. job_5.setBounds(374, 242, 163, 172);
  576. panel_joblistings.add(job_5);
  577.  
  578. JButton bttn_visit_job_5 = new JButton("Visit");
  579. bttn_visit_job_5.setFont(new Font("Arial", Font.PLAIN, 16));
  580. bttn_visit_job_5.setBounds(10, 145, 143, 21);
  581. job_5.add(bttn_visit_job_5);
  582.  
  583. JLabel lbl_name_job_5 = new JLabel("Job Name:");
  584. lbl_name_job_5.setFont(new Font("Arial", Font.PLAIN, 12));
  585. lbl_name_job_5.setBounds(10, 10, 143, 13);
  586. job_5.add(lbl_name_job_5);
  587.  
  588. JLabel lbl_budget_job_5 = new JLabel("Budget:");
  589. lbl_budget_job_5.setFont(new Font("Arial", Font.PLAIN, 12));
  590. lbl_budget_job_5.setBounds(10, 33, 143, 13);
  591. job_5.add(lbl_budget_job_5);
  592.  
  593. JLabel lbl_duedate_job_5 = new JLabel("Due Date:");
  594. lbl_duedate_job_5.setFont(new Font("Arial", Font.PLAIN, 12));
  595. lbl_duedate_job_5.setBounds(10, 56, 143, 13);
  596. job_5.add(lbl_duedate_job_5);
  597.  
  598. JLabel lbl_category_job_5 = new JLabel("Category:");
  599. lbl_category_job_5.setFont(new Font("Arial", Font.PLAIN, 12));
  600. lbl_category_job_5.setBounds(10, 79, 143, 13);
  601. job_5.add(lbl_category_job_5);
  602.  
  603. JLabel lbl_applicants_job_5 = new JLabel("Applicants:");
  604. lbl_applicants_job_5.setFont(new Font("Arial", Font.PLAIN, 12));
  605. lbl_applicants_job_5.setBounds(10, 102, 143, 13);
  606. job_5.add(lbl_applicants_job_5);
  607.  
  608. JLabel lbl_visit_job_5 = new JLabel("Views:");
  609. lbl_visit_job_5.setFont(new Font("Arial", Font.PLAIN, 12));
  610. lbl_visit_job_5.setBounds(10, 125, 143, 13);
  611. job_5.add(lbl_visit_job_5);
  612.  
  613. JPanel panel_latestjob_1 = new JPanel();
  614. panel_latestjob_1.setLayout(null);
  615. panel_latestjob_1.setBorder(new LineBorder(new Color(153, 180, 209), 1, true));
  616. panel_latestjob_1.setBounds(10, 452, 278, 164);
  617. main_panel.add(panel_latestjob_1);
  618.  
  619. JEditorPane app_log = new JEditorPane();
  620. app_log.setEditable(false);
  621. app_log.setForeground(Color.GREEN);
  622. app_log.setBackground(Color.DARK_GRAY);
  623. app_log.setText("<00:00> Application Started.");
  624. app_log.setFont(new Font("Arial", Font.BOLD, 12));
  625. app_log.setToolTipText("Console log for all that has happened.");
  626. app_log.setBounds(10, 10, 258, 144);
  627. panel_latestjob_1.add(app_log);
  628.  
  629. JLabel lblStopped = new JLabel("Stopped");
  630. lblStopped.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 72));
  631. lblStopped.setBounds(344, 25, 515, 85);
  632. main_panel.add(lblStopped);
  633. }
  634.  
  635. private class SwingAction extends AbstractAction {
  636. public SwingAction() {
  637. putValue(NAME, "SwingAction");
  638. putValue(SHORT_DESCRIPTION, "Some short description");
  639. }
  640. public void actionPerformed(ActionEvent e) {
  641. }
  642. }
  643.  
  644.  
  645. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement