Full Stack, Web Dev & Java Dev Task - 4
Full Stack, Web Dev & Java Dev Task - 4
NetBeans IDE
Copy
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
• Title Label:
Drag a JLabel to the top. Set text to "Welcome to the Homepage".
o
o Customize font (e.g., Arial, Bold, 20px) and center alignment.
• Navigation Buttons:
Add JButtons for "View Profile", "Settings", and "Logout".
o
o Name them viewProfileButton, settingsButton, and logoutButton in
the Properties window.
o Adjust button colors or fonts (optional).
• User Greeting:
o Add a JLabel with text like "Hello, User!" below the title.
1. Use GroupLayout:
o Select the form background and use GroupLayout for alignment.
o Arrange components vertically:
Copy
Title Label
User Greeting
Buttons (View Profile, Settings, Logout)
2. Adjust Sizing:
o Set button widths to 150px for consistency.
o Add padding between components using the layout manager.
java
Copy
Troubleshooting Tips
Next Steps
• Add database operations (e.g., validate login credentials using SQL queries).
• Design more pages (e.g., Profile, Settings) and link them via buttons.