<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Netbeans%2FC2%2FDesigning-GUI-for-Sample-Java-Application%2FEnglish</id>
		<title>Netbeans/C2/Designing-GUI-for-Sample-Java-Application/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Netbeans%2FC2%2FDesigning-GUI-for-Sample-Java-Application%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Netbeans/C2/Designing-GUI-for-Sample-Java-Application/English&amp;action=history"/>
		<updated>2026-04-23T23:04:57Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Netbeans/C2/Designing-GUI-for-Sample-Java-Application/English&amp;diff=213&amp;oldid=prev</id>
		<title>Chandrika: Created page with '[http://spoken-tutorial.org/wiki/images/6/6a/Designing_GUIs_in_Netbeans_-_Resources.zip Resources for &quot;Designing GUIs in Netbeans&quot;]  {| style=&quot;border-spacing:0;&quot; | style=&quot;border-…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Netbeans/C2/Designing-GUI-for-Sample-Java-Application/English&amp;diff=213&amp;oldid=prev"/>
				<updated>2012-11-27T12:36:26Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;[http://spoken-tutorial.org/wiki/images/6/6a/Designing_GUIs_in_Netbeans_-_Resources.zip Resources for &amp;quot;Designing GUIs in Netbeans&amp;quot;]  {| style=&amp;quot;border-spacing:0;&amp;quot; | style=&amp;quot;border-…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[http://spoken-tutorial.org/wiki/images/6/6a/Designing_GUIs_in_Netbeans_-_Resources.zip Resources for &amp;quot;Designing GUIs in Netbeans&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
| style=&amp;quot;border-top:0.0007in solid #000000;border-bottom:0.0007in solid #000000;border-left:0.0007in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
| style=&amp;quot;border:0.0007in solid #000000;padding:0.0382in;&amp;quot;| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 1&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| Hello everyone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome to the tutorial on Building GUIs using Netbeans. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will see one of the most attractive features of Netbeans, which is its GUI Builder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 2&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''What does Netbeans provide for building GUI?'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gives you a What You See Is What You Get designer to create your GUI. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It gives you an easy interface to drag-and-drop components to create your layout. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 3&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| It comes with a Component Palette which has preinstalled AWT and Swing components. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will be making use of this powerful visual editor to build a complete GUI application in just a few minutes.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 4&lt;br /&gt;
&lt;br /&gt;
System Setup&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| For this demonstration I'm using a system that has&lt;br /&gt;
&lt;br /&gt;
* Ubuntu 11.04 OS&lt;br /&gt;
* and has the Netbeans 7.0.1 IDE&lt;br /&gt;
&lt;br /&gt;
For more details on the installation and requirements please refer to the previous tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 5, Slide 6&lt;br /&gt;
&lt;br /&gt;
Lesson Outline&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''In this tutorial we will learn to'''&lt;br /&gt;
&lt;br /&gt;
* use the Form Editor &lt;br /&gt;
* the Source Editor &lt;br /&gt;
* the Palette, Inspector, and Properties features &lt;br /&gt;
* Add event handlers &lt;br /&gt;
* and also Compile and run our application &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 7, Slide 8&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Let's get started and build a simple Account balance application.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Today we will build a simple Bank balance application, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
to see how to create GUI using Netbeans. &lt;br /&gt;
&lt;br /&gt;
'''What do we want?'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this (application) we want to be able to&lt;br /&gt;
&lt;br /&gt;
# Input the amount credited to the account. &lt;br /&gt;
# Input the amount debited from the account. &lt;br /&gt;
# And compute the final balance.&lt;br /&gt;
# We will also add a picture to make our application look more attractive. &lt;br /&gt;
# Let's also have a menu bar on top for easy and quick navigation. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Move to Netbeans&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''File &amp;gt; New Project &amp;gt; Java Application'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Create a new netbeans project.''' &lt;br /&gt;
&lt;br /&gt;
Let's now move to netbeans and start (by)creating a new project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to '''File &amp;gt; New Project &amp;gt; '''and choose a '''Java Application.''' Say Next.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Give it the name Account Balance. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Don't create a main class but set it as the main project. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Say finish, that should create a new project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Netbeans JframeForm&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''File &amp;gt; New File &amp;gt; Swing GUI forms &amp;gt; Jframe Form'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| In Netbeans,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now go back to '''File &amp;gt; New File &amp;gt; '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and choose '''Swing GUI forms &amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and choose a''' Jframe Form.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Say Next. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'm going to call this AccountBalance as well, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
but you can give it any other name you wish to. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you say Finish, it takes you to the main design area.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Hover the mouse around the canvas, Palette, Properties and Inspector.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Getting familiar with the GUI builder.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# '''Design area'''&lt;br /&gt;
# '''Palette'''&lt;br /&gt;
# '''Properties window'''&lt;br /&gt;
# '''Inspector'''&lt;br /&gt;
&lt;br /&gt;
'''Palette'''&lt;br /&gt;
&lt;br /&gt;
Here on the right is the Palette. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This contains the pre-installed Swing and AWT components.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Properties '''&lt;br /&gt;
&lt;br /&gt;
Down here is the Properties window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This shows you the properties of the components as you choose them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Inspector'''&lt;br /&gt;
&lt;br /&gt;
Here on the left is the inspector. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The inspector shows you the components that have been added to the frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Switch to Source View Button.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Source/Design'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On top here, is the Source button. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you click on it, it takes you to the source code. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you add components to the design, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
it takes the corresponding source code and adds it to the source here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's go back to design and see what components we'll use today.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 9&lt;br /&gt;
&lt;br /&gt;
Components&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| (For this application, we are going to make use of some these components.)&lt;br /&gt;
&lt;br /&gt;
We will be using:&lt;br /&gt;
&lt;br /&gt;
* a tabbed pane &lt;br /&gt;
* panel &lt;br /&gt;
* few labels &lt;br /&gt;
* text field &lt;br /&gt;
* button &lt;br /&gt;
* and a menu &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Netbeans&lt;br /&gt;
&lt;br /&gt;
'''Palette &amp;gt; TabbedPane'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| Now go to the the Palette and choose a tabbedPane.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to '''Palette &amp;gt; TabbedPane'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the TabbedPane in the palette &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and then click on the form (JframeForm) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This should give you a tabbed frame. And now, you can re-size it using a mouse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Palette &amp;gt; Label'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switch between the two panels using the tabs.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| Go back to the Palette, choose a Panel. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the Panel and (then) click here (on the pane in your jFrameForm). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That should give you a tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go back and choose another panel. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click (on Panel) and click back here(Pane). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That gives you 2 tabs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Double click on the tab# title.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Rename tabs.'''&lt;br /&gt;
&lt;br /&gt;
You can Rename it(tab) by double clicking on it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and give it the name you wish to. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'm going to call this Image and let me call the other one (as) Balance.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Go to '''Palette &amp;gt; Swing controls &amp;gt; jLabel''' and click on the panel&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Adding Labels.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's go back to the Palette and add a label. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose label from the Swing Controls and add it here(JFrameForm).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are going to need 6 labels for our(this) application. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can position and align them as you click them. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And use the mouse to re-position or re-align them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(I have now added 6 labels.)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Double click on the text on the label to change the text displayed.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Changing text displayed.'''&lt;br /&gt;
&lt;br /&gt;
To change the text on the label, just double-click it &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and add the text, and the label name gets changed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type Initial Amount&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| I called the first one Initial Amount.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type Credit Amount&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| And I'm going to call this Credit Amount.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type Rs.5000.0 on Initial Amount.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Initial amount'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We'll set the initial amount to be Rs.5000.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type stars (*****) in label5. &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| And after we compute the balance we have to put the balance here (next to balance label)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But initially, we'll set the balance to be just stars. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once we compute the balance we can put them here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Go to '''Palette &amp;gt; Swing Controls &amp;gt; TextField'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on TextField and then click on panel.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Adding textboxes.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, go to Palette and choose '''TextField''' (textfield component), and drop it here. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That should give you the textfield.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Click on it and click back into the panel.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose another Textfield for the debit amount as well. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We should leave the textfield places also blank.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am leaving this (textfield1) blank. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'm also going to leave the other field(textfield2) blank.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Resize the textfield using the mouse.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Aligning, resizing and repositioning components on your panel.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can re-size them using the mouse. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have done that(re-sizing), you can now go back to palette and choose a button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Go to '''Palette &amp;gt; Swing Controls &amp;gt; Button'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set Button text as 'Get Balance'&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Adding a button.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's add the button here(at the bottom of the frame).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can change the label (text displayed on the label) in the button also, to read 'Get Balance'. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is our GUI!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Go to '''Palette &amp;gt; Swing Controls &amp;gt; Label'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Properties -&amp;gt; icon -&amp;gt; external image'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Adding an image in your display.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's now go to the Image tab (tab1) and add an image.''' '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do that let's go back to Palette &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and choose another Label, and drop it here(on the panel). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, go to '''Properties''' (button) and go to '''icon''' (property). Click on the 3 dots here (next to icon). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose External Image – and click on the 3 dots here (on the right). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose an image from your directory and say OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click OK again here. This should give you an image.&lt;br /&gt;
&lt;br /&gt;
You can remove the text on the label (here) by double clicking on it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can reposition and center your image using the mouse. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we have added an image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Palette &amp;gt; Swing Menus &amp;gt; Menu Bar'''&lt;br /&gt;
&lt;br /&gt;
(Drop it on top of jFrame)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change '''Edit '''to '''Help'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inspector, right-click jMenu1&lt;br /&gt;
&lt;br /&gt;
'''Add from Palette &amp;gt; Menu Item'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MenuItem Text to Exit&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Adding a Menu.'''&lt;br /&gt;
&lt;br /&gt;
Let's now go to Palette and add a menubar. &lt;br /&gt;
&lt;br /&gt;
# Choose '''Menu Bar '''from '''Swing Menus '''and click here (on top of panel). That should give you a menu bar.&lt;br /&gt;
# By default it already has 2 Menu labels (items): File and Edit. Double click on the Edit text and to rename it to Help.&lt;br /&gt;
# You can also add a submenu (item) under File. In the Inspector, right-click jMenu1 ,and choose Add From Palette &amp;gt; and choose Menu Item. That should add a MenuItem(jMenuItem). You can also rename that to say Exit. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| [[Image:]]&lt;br /&gt;
&lt;br /&gt;
Click on &lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Check your GUI.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:]]Now, our GUI is more or less complete. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's now look at a preview. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the 'Preview Design' button on top&lt;br /&gt;
&lt;br /&gt;
That shows a preview of what you have done so far. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, the buttons don't (yet) work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But once you add in the code, you can have everything working.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Go to the '''Inspector''' window and right-click on jTextfiedl1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose “'''Change Variable Name ...'''”&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose the final label to display nothing and change it's name to resultBalance.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Assigning names to some of the components.'''&lt;br /&gt;
&lt;br /&gt;
Now, before adding the code, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let's give proper variable names to the input textfields.&lt;br /&gt;
&lt;br /&gt;
Go to the '''Inspector''' window and right-click on jTextfiedl1,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and Choose “'''Change Variable Name ...'''” and type in the name you want for the box. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am going to call this first field creditAmount. &lt;br /&gt;
&lt;br /&gt;
You can also do that by directly right clicking on the component &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and choosing Change Variable Name. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's call that (2ndtextfield) debitAmount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'm also going to call this final label (****) resultBalance. final output in resultBalance. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Code Block from gedit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Copy Code'''&lt;br /&gt;
&lt;br /&gt;
Let's now see the code, to get the application working.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What I want is to getText() from the creditAmount; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
getText() from the debitAmount, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
compute the balance and place the amount in the final resultBalance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am going to copy the code here:&lt;br /&gt;
&lt;br /&gt;
double creditMoney = Double.parseDouble(creditAmount.getText()); &lt;br /&gt;
&lt;br /&gt;
double debitMoney = Double.parseDouble(debitAmount.getText()); &lt;br /&gt;
&lt;br /&gt;
double initialBalance = 5000.0; &lt;br /&gt;
&lt;br /&gt;
double balanceMoney = initialBalance + creditMoney - debitMoney; &lt;br /&gt;
&lt;br /&gt;
resultBalance.setText(&amp;quot;Rs. &amp;quot; + balanceMoney); &lt;br /&gt;
&lt;br /&gt;
and Go back to 'Get Balance' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Button (right click) &amp;gt; Events &amp;gt; Action &amp;gt; Action Performed'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Button press event.'''&lt;br /&gt;
&lt;br /&gt;
Now right click on the Button. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Choose add an event., choose action, and choose''' Action Performed'''.&lt;br /&gt;
&lt;br /&gt;
This will take you to the section of the code &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where you will have to write the (copied) code for the action to be performed on the button press.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''Ctrl+S'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Design '''button.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Save'''&lt;br /&gt;
&lt;br /&gt;
Let's save this code (Ctrl+S) and go back to Design.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| '''File '''menu text (inspector)''' (right click) &amp;gt; Events &amp;gt; Action &amp;gt; Action Performed'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type in System.exit(1);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ctrl+S (save)&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Exit action.'''&lt;br /&gt;
&lt;br /&gt;
Let's add in the code to Exit the application. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right click on the menuItem, Choose Events, Action and''' Action Performed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we need to write the code to exit successfully from the application. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That is going to be System.exit(1) and exit with value 1. Save the code and go back to design.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| File-&amp;gt;Exit , next to it you can see shortcut, tripleclick on that. Type '''Ctrl+Q'''.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Adding a shortcut (for a menu item)'''&lt;br /&gt;
&lt;br /&gt;
If you noticed, we can also add a shortcut here (next to Exit)&lt;br /&gt;
&lt;br /&gt;
Double click on it, and use the keyboard to add in keys. I'm going to say (set) '''Ctrl+Q '''as the shortcut-key to quit from the application.&lt;br /&gt;
&lt;br /&gt;
That's it, our application is complete.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Show Run button on top.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switch between Image and Balance tabs moving the mouse over each item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type 300, 200 and click Get Balance button.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Build and Run.'''&lt;br /&gt;
&lt;br /&gt;
Let's now run the application by choosing F6. Say OK (on pop up). and get the application running.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Well, here it is. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let's just a check and credit the amount with Rs.300/-. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's put the debit amount as Rs.200. And Say 'Get Balance'. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This gives us the correct amount in the balance. Let's now exit from the application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Application '''File &amp;gt; Exit'''&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Exit.'''&lt;br /&gt;
&lt;br /&gt;
(To exit) Go to File and say Exit. That closed the application successfully. (We could have also closed using '''Ctrl+Q'''.) )&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 9, Slide 10&lt;br /&gt;
&lt;br /&gt;
Assignment&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run TemperatureConvertor application.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Assignment.'''&lt;br /&gt;
&lt;br /&gt;
With the application complete, it's time for the assignment. &lt;br /&gt;
&lt;br /&gt;
The task is to create a Temperature convertor application. I will show you how it should look.&lt;br /&gt;
&lt;br /&gt;
# It should have 2 tabs, slike the previous on. 1 to convert from Centigrade to Fahrenheit and another for Fahrenheit to Celsius.&lt;br /&gt;
# It should also take the input (textfield) temperature. &lt;br /&gt;
# Display the converted temperature&lt;br /&gt;
# It should also have a menu bar on top that shows File and Help and Exit under file, and a short-cut key that says Ctrl +X to exit from the application.&lt;br /&gt;
&lt;br /&gt;
Let's run the application.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Type -40 and click on Get Fahrenheit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Move mouse away from Exit menu item.&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| '''Run Assignment Solution.'''&lt;br /&gt;
&lt;br /&gt;
When you run the application, e.g -40 which is the same in Celsius and Fahrenheit, &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
it (the app) should give the correct output temperature.&lt;br /&gt;
&lt;br /&gt;
Let me try the short-cut key, Ctrl+X, to Exit form the application.. The application has exited succesfully.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 11, Slide 12, Slide 13&lt;br /&gt;
&lt;br /&gt;
About the Spoken Tutorial Project&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| The video at [http://spoken-tutorial.org/What_is_a_Spoken_Tutorial http://spoken-tutorial.org/What_is_a_Spoken_Tutorial] summarizes the spoken tutorial project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not have good bandwidth, you can download and watch it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We conduct workshops using spoken tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We also give certificates to those who pass an online test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please contact us for more details.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 14, Slide 15&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| I would like to acknowledge the spoken tutorial project &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
which is a part of the talk to a teacher project. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is supported by the National Mission on Education through ICT, MHRD, government of India.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more information please visit their website. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:none;padding:0.097cm;&amp;quot;| Slide 16&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.002cm solid #000000;border-left:0.002cm solid #000000;border-right:0.002cm solid #000000;padding:0.097cm;&amp;quot;| The contributors for tutorial are Subhashini Venugopalan and Sindhu Ghanti from IT for Change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thank you for joining us.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>