Month: September 2008

Java Swing GUI Example Program

This Java source code is an example of a Graphical User Interface (GUI) with different GUI elements such as TextBox, Buttons, TextArea, Text Area and Labels. It is implemented using Java Swing API which provides a set of “lightweight” (all-Java language) components. This code example extends the functionality of JFrame class to show a JFrame window and Implements ActionListener on buttons to catch the click event on those buttons.

Read More

Java Calculator Program with AWT and Swing Based GUI

This Java source code implements a basic calculator with a graphical user interface (GUI) using AWT and Swing. The program is structured in a way that makes it suitable for novice programmers to understand and learn about GUI development in Java. It serves as an excellent starting point for those looking to explore basic GUI applications and understand the principles of event-driven programming.

Read More

Simple Java Contact Form

The following Java code defines a simple GUI application using Swing. It creates a form with text fields for name and email, a text area for messages, and actions buttons for OK and Cancel operations. Additionally, there is a button to change the background color of the form.

Read More

String Sorting in Java

In this article, we explore different sorting techniques applied to strings in Java. We will look into the implementation of the direct insertion sorting algorithm and more advanced techniques such as the Merge Sort and Quick Sort algorithms. Each approach offers unique advantages by providing Java developers with flexibility in choosing the most suitable method based on the specific requirements of their applications.

Read More

Java Program to Draw Star Shapes

This Java program creates a simple graphical application that draws rows of stars using Java’s Swing library. The program creates a window with rows of stars drawn on it. The Star class defines the shape of a star, the StarPane class handles the drawing logic, and the StarApplet class sets up the main frame for the application. This example showcases basic GUI programming with Swing.

Read More

Blackjack Java Game Challenge

The Blackjack game written in Java provides a graphical user interface (GUI) for players to enjoy a simplified version of the classic card game. Upon starting the game, players are dealt an initial set of two cards each, and the goal is to build a hand with a total value as close to 21 as possible without exceeding it. The game features a deck of standard playing cards, including numbered cards, face cards (King, Queen, Jack), and Aces, each contributing their respective values to the hand.

Read More
Mothers Day Gift Ideas