String ss= new String;
String tt= new String;
String s = "YD";:
String t = "Y" + "D";(dynamiccomputationusingastring
System.out.println(ss.equals(tt) / prints false
Menus group commands that we can use in an application. Toolbars provide a quick access to
the most frequently used commands. In Java Swing, the JToolBar class creates a toolbar in an
Each menu can also have a submenu. This way we can group similar commnads into groups. For
example we can place commands that hide/show various toolbars like personal bar, address bar,
status bar or navigation bar into a submenu called toolbars. W
Menus and toolbars in Java Swing
A menubar is one of the most visible parts of the GUI application. It is a group of commands
located in various menus. While in console applications you had to remember all those arcane
commands, here we have most of the c
Say, we wanted to create two toolbars. The next example shows, how we could do it.
Tooltips are part of the internal application's help system. The Swing shows a small rectangular
window, if we hover a mouse pointer over an object.
Java Swing Events
Events are an important part in any GUI program. All GUI applications are event-driven. An
application reacts to different event types which are generated during its life. Events are
generated mainly by the user of an application. But th
A popup menu
Another type of a menu is a popup menu. It is sometimes called a context menu. It is usually
shown, when we right click on a component. The idea is to provide only the commands, that are
relevant to the current context. Say we have an image.
BoxLayout is a powerful manager, that can be used to create sofisticated layouts. This layout
manager puts components into a row or into a column. It enables nesting, a powerful feature,
that makes this manager very flexible. It means, that we c
A menu item that can be selected or deselected. If selected, the menu item typically appears
with a checkmark next to it. If unselected or deselected, the menu item appears without a
checkmark. Like a regular menu item, a check box menu
$string='This is a string and it is an example.';
The GridLayout layout manager lays out components in a rectangular grid. The container is
divided into equally sized rectangles. One component is placed in each rectangle.
This is a Java Swing tutorial. The Java Swing tutorial is suited for beginners and intermediate
Swing developers. After reading this tutorial, you will be able to develop non-trivial Java Swing
Swing is a principal GUI toolk
Human is a Person
Klingon is a Person
Human is a Person
* Object-Oriented Programming
* Copyright (C) 2012 Robert Grimm
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
Author: Anurag Saini
This class provides a mean to print tree data structure.
To use this, convert your tree node structure to corresponding
TextNode data-structure and make sure that text of TextNode
contains no new line.