Skip to main content

Posts

Showing posts from March, 2018

Information form in Java

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(