This tutorial has two classes. ActionListener and Main class are seperated from each other.
- ParamListener.java
- BtnsListener.java

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
/**
* ParamListener.java
*/
public class ParamListener extends JFrame{
public ParamListener() {
JButton btn10 = new JButton("10");
JButton btn20 = new JButton("20");
JButton btn30 = new JButton("30");
JButton btn40 = new JButton("40");
btn10.addActionListener( new BtnsListener ("ten"));
btn20.addActionListener( new BtnsListener ("twenty"));
btn30.addActionListener( new BtnsListener ("thirty"));
btn40.addActionListener( new BtnsListener ("fourty"));
JPanel content = new JPanel();
content.add(btn10);
content.add(btn20);
content.add(btn30);
content.add(btn40);
setContentPane(content);
setTitle("A Tutorial");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
pack();
}
public static void main(String[] args) {
new ParamListener();
}
}
Read more…
VN:F [1.9.11_1134]
Rating: 1.0/10 (1 vote cast)
VN:F [1.9.11_1134]
Here is my microprocessors lecture notes. Also you can have information about assembly programming with TASM. All the 20 lectures are available.
Lecture 1
- Microcomputers and Microprocessors
- Evolution of Intel 80×86 Family Microprocessors
- Binary and Hexadecimal Number Systems
Lecture 2
- Brief History of 80×86 Family of Microprocessors
- Pipelining and Registers
- Introduction to Assembly Programming
Lecture 3
- Introduction to Assembly Programming (cont. from Lecture 2)
- Introduction to Program Segments
Lecture 4
- Memory Map of the IBM PC
- Pushing and Popping Operations (Stack)
- Flag Registers and bit fields
Lecture 5
- Flag Registers and bit fields
- 80×86 addressing modes.
Lecture 6
- Directives and sample programs
- Assemble, link and run a program
Lecture 7
- Control transfer instructions
- CALL statement
- Subroutines
- Data Types and Data Definition
Lecture 8
- Arithmetic and Logic Instructions and Programs
- Unsigned Addition and Subtraction
Lecture 9
- Unsigned Subtraction
- Unsigned Multiplication and Division
- Arithmetic and Logic Instructions and Programs
Read more…
VN:F [1.9.11_1134]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.11_1134]
Recent Comments