CSE2137 - Object Oriented Programming¶
Event-Based and GUI Programming¶
Term 151¶
- Q5(a) [4]: What is the relationship between an event-listener interface and an event-adapter class? How can a GUI component handle its own events?
- Q6(b) [5]: Write a program to have a GUI based simple calculator in a frame supporting addition and subtraction. There are buttons for 0 to 9 digits and for arithmetic operations. Select layout of your choice.
- Q6(c) [5]: Write code segment of a simple JFrame with one JLabel and JButton.
Term 161¶
- Q6(a) [5]: Draw the block diagram of applet class inherited properties from a long chain of classes. Explain briefly the life cycle of an applet.
- Q6(b) [5]: Write an applet program that draws a rectangle, an oval, a string and a line on the applet.
- Q7(a) [4]: Describe the purpose of any six Swing components.
- Q7(b) [2]: What are AWT and GUI?
- Q7(c) [4]: Write a complete program to have 3 Buttons in a frame having exit capabilities. Buttons are to be added in the frame as per the layout of your choice. Count and display number of times each Button being clicked.
Term 171¶
- Q7(a) [1+2]: What is SWING library used for in Java? What is the base package that you have to import for SWING classes?
- Q7(b) [2+1]: What are layout managers? Name three of the Layout managers SWING has.
Term 181¶
- Q5(b) [2+3]: What is an event in event-based programming? Discuss the types of events.
- Q5(c) [3]: Discuss the benefits of delegation event model in programming.
- Q6(a) [1+2]: What does GUI stand for? Why is it important?
- Q7(a) [1+2]: What are layout managers? Mention the name of three layout manager available in java swing package.
Term 201¶
- Q6(c) [5]: Containers and components are two types of Java GUI elements. Using a suitable diagram explain those elements.
- Q7(a) [1+2]: What are layout managers? Mention the name of three layout managers available in Java swing package.
- Q7(b) [4]: What are the three components in the delegation event model? Explain.
- Q7(c) [2+2]: What is the relationship between an event-listener interface and an event-adapter class? How can a GUI component handle its own events?
Term 211¶
- Q5(b) [5]: Containers and components are two types of Java GUI elements. Using a suitable diagram explain those elements.
- Q5(c) [1+4]: What are layout managers? Mention the name of three layout managers available in Java with proper diagram.
- Q7(b) [4]: Write a Java Program that draw a rectangle, an oval, a string and a line.
- Q7(c) [2+3]: What is an event in event-based programming? Discuss the types of events.