JButton Example
Swing

JButton and ActionListener

It is a simple example which has only two components in it. One is JButton and the other one JLabel. When user clicks the Flip Mode button, the Label changes its caption from Read Mode to Write Mode. Upon clicking the button again, the label restores its original caption Read Mode. So during each click, the Label will alternate between the text Read Mode & Write Mode. Let us proceed with the coding:

Panel Containers as Cards
AWT, Java

AWT Card Layout in Java Explained

This example requires preliminary knowledge on the AWT Frame Window, Nested Containers. You can read the articles from the below Links in the order specified. Article on AWT Frame Window From Hub Pages Net work => Hub Page ArticleArticle on Panel and Nested Containers => Coding-Examples Article 1. Introduction to Card Layout In this example, … Continue reading