- Programmers often must create forms using oops; today we’ll be creating one using Java. So remember the goal of this is to experiment with the code so enjoy!
- import java.awt.Color;
- import java.awt.GridLayout;
- import javax.swing.*;
- class INFORFORM {
- public static void main(String[] args) {
- String[] selections = {"QUESTIONS", "REQUESTS", "INFORMATION", "INQUIERY", "PRESS","OTHER"};
- JComboBox comboX = new JComboBox(selections);
- JTextField NAME = new JTextField("WIRED2TECH");
- JTextField EMAIL = new JTextField("WIRED2TECH2@AOL.COM");
- JTextField QUESTION=new JTextField("CAN YOU WRITE AN ARTICLE ABOUT MY SCHOOL");
- JPanel panel = new JPanel(new GridLayout(12, 10,13,15));
- panel.setBorder(BorderFactory.createEmptyBorder(10,10,8,8));
- panel.add(comboX);
- panel.add(new JLabel("NAME:"));
- panel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
- panel.add(NAME);
- panel.add(new JLabel("EMAIL:"));
- panel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
- panel.add(EMAIL);
- panel.add(new JLabel("QUESTION:"));
- panel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
- panel.add(QUESTION);
- int result = JOptionPane.showConfirmDialog(null, panel, "RUN",
- JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
- if (result == JOptionPane.OK_OPTION) {
- System.out.println(comboX.getSelectedItem()
- + " " + NAME.getText()
- + " " + EMAIL.getText());
- } else {
- System.out.println("Operation Cancelled!?");
- }
- }
- }
TODAY I'LL BE SHOWING YOU AN APP I MADE IN PASCAL USING BORLAND DELPHI. THIS APP WAS THE SUBJECT OF MY FINALS EXAMINATION IN WHICH I HAD TO PROGRAM AN APP THAT WOULD COMPUTE AND CALCULATE CERTAIN VALUES THIS APP IS AN INTERNAL APPLICATION THAT RUNS ON THE OLD WIN 98 SO ITS BASICALLY AN APP THAT A COMPANY OR CASHIER WOULD USE TO CALCULATE. IF YOU WANT TO RUN IT JUST COPY THE CODE BELOW, JUST DONT TRY AND USE IT AS YOUR OWN OR SAY ITS YOURS BECAUSE THATS JUST A COMPLETE VIOLATION OF NERD LAW SO DONT BETRAY US. IF YOU WANT TO USE IT AT SCHOOL OR SOMETHING JUST SAY WHERE YOU GOT THE CODE FROM AND CLARIFY YOU GOT IT FROM THIS BLOG.
THANK YOU FOR READING;
------------------------------------------------------------------------------------------------------------------------
unit oo;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Edit2: …
THANK YOU FOR READING;
------------------------------------------------------------------------------------------------------------------------
unit oo;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Edit2: …
Comments
Post a Comment