Introduction to Java using NetBeans
Section 2 - GUI
Creating a Project with a GUI
4. Right Click on CapturingData in the Projects List. Choose New > JFrame Form and Name your Form
Building your GUI
Modify your form and make it look a little better
Congratulations. You have now just completed your first program with a GUI. It is now time to make it run
Modify the Capturing Data code as follows:
Modifying the Code
Now that you have a running program with a working GUI, it is time to experiment. Try changing the properties of some of the components. Try adding new components. Play around with the code and see what you can do.
A good place to start is by adding a new button and labeling it Exit. Now add an event to this button that causes the program to close when the button is pressed. Use the following code inside your ActionPerformed method to end the program:
Use the website below to find Java String Methods to complete the programs below.
Assignment 2.10 - Birthday Program
A sample layout for the input/output screen is shown below.
Feel free to create your own version of this screen using a different background, colour, and/or a different text font style/size.
Note: Use a Panel the size of your form to set the Background!
Modify the Program so that when the user enters First Name and Last Name in the "Enter Name" field the program the following output will be displayed
LASTNAME Family Birthdays ( lastname All caps)
Firstname's Birthday is on May 29, 1982
DOE Family Birthdays
ICS4U modify the program to include 2 additional names.
Assignment 2.11 - Monogram
Create a monogram application that prompts the user to enter his or her first, middle, and last names and then displays a monogram with the first and middle initial in lowercase and the last initial in uppercase.
Assignment 2.12 - Replace String
Create a Replace String application that displays the new string in a lable. The new string should take a sentence entered by the user and replace every occurence of a substring with the new string supplied.
ICS4U modify the program so that the user can modify all instances or only the first instance.
Assignment 2.13 - Remove String
Create a Remove Sting application that displays a new string in a label. The new string should take a sentence entered by the user and remove every occurrence of a substring supplied by the user.
ICS4U modify the program so that the user can remove all instances or only the first instance.
Complete the S2 Rubric and place it in a Rubrics folder on your Google Drive. Make sure I have access to edit this file.
Put a link to your Rubric on your website.
Include link to folder, link to jar file, code.
Creating a Jar File