GUI Programming using Java

Jan Newmarch jan@newmarch.name


Last modified: 23 December, 1995. These slides are Copyright Jan Newmarch, 1995. This tutorial discusses using the AWT (Abstract Window Toolkit) of Java to perform platform-independant GUI programming. It makes the following assumptions: Familiarity with C; Exposure to OO programming; Familiarity with a GUI library - preferably Motif. Implementation details are based in Xt/Motif. The intended audience is Xt/Motif programmers who want to see what Java programming can offer, and understand its strengths and limitations.

1. PART A: Java

2. Simple Types and Statements

3. Arrays

4. Classes

5. Methods

6. Interfaces

7. Standard Libraries

8. Addresses Example

9. Addresses (2)

10. Addresses (3)

11. Addresses (4)

12. Addresses (5)

13. Addresses (6)

14. Addresses (7)

15. Addresses (8)

16. Addresses (9)

17. Addresses (10)

18. PART B: GUI Library

19. GUI Hierarchy

20. Primitive Components

21. Container Components

22. MenuComponents

23. Layout Objects

24. Component Objects

25. Label

26. Label (2)

27. Hello World

28. Frame

29. Resources

30. Resources (2)

31. Label Resources

32. Button

33. AWT events

34. AWT Events (2)

35. AWT Event fields

36. AWT Event Handling

37. Default AWT Event Handling

38. Application Event Handling

39. Frame overrides handleEvent()

40. Frame overrides convenience methods

41. ``Primitive'' overrides handleEvent()

42. ``Primitive'' overrides convenience methods

43. Implementation of event handling

44. List

45. SelectList event handler

46. SelectList convenience handlers

47. TextComponent

48. TextField

49. TextField: Password Entry

50. TextField: Password Entry (2)

51. TextArea

52. TextArea (2)

53. FileDialog

54. FileDialog (2)

55. FileDialog Parent

56. Panel

57. AddressBook example

58. AddressBook code

59. AddressBook (2)

60. AddressBook (3)

61. AddressBook (4)

62. AddressBook (5)

63. AddressBook (6)

64. AddressBook (7)

65. AddressBook (8)

66. Geometry

67. Size Calculations

68. Geometry Calculations

69. Insets and Layout Objects

70. BorderLayout

71. BorderLayout (2)

72. BorderLayout (3)

73. FlowLayout

74. FlowLayout (2)

75. FlowLayout (3)

76. GridLayout

77. GridLayout (2)

78. GridLayout (3)

79. GridBagLayout

80. GridBagLayout: Direction of Addition

81. GridBagLayout: Direction of Addition (2)

82. GridBagLayout: Direction of Addition (3)

83. GridBagLayout: Direction of Addition (4)

84. GridBagLayout: Direction of Addition (5)

85. GridBagLayout: Direction of Addition (6)

86. GridBagLayout: Direction of Addition (7)

87. GridBagLayout: Direction of Addition (8)

88. GridBagLayout: Cell Size Requests

89. GridBagLayout: Multiple Rows

90. GridBagLayout: Multiple Rows (2)

91. GridBagLayout: Multiple Rows (3)

92. GridBagLayout: Cell Size Granting

93. Denied Request

94. Accepted Request

95. Accepted Request (2)

96. GridBaglayout: Resizing

97. GridBaglayout: Fill

98. GridBaglayout: Anchors

99. A Complex Layout

100. A Complex Layout (2)

101. CardLayout

102. CardLayout (2)

103. CardLayout (3)

104. Menus

105. MenuBar

106. Menu

107. MenuItem and CheckboxMenuItem

108. Menu Example

109. Menu selection handling

110. Dirty menu selection handling

111. Cleaner menu selection handling

112. Cleaner menu selection handling (2)

113. Cleaner menu selection handling (3)

114. A complete menu

115. A complete menu (2)

116. A complete menu (3)

117. Dialogs

118. About Dialog

119. About Dialog (2)

120. About Dialog (3)

121. Fonts

122. Graphics

123. PART C: ADDING COMBOBOX WIDGET

124. Java Files

125. ComboBox.java

126. ComboBox.java (2)

127. ComboBoxPeer.java

128. MComboBoxPeer.java

129. ComboBoxPeer.java (2)

130. ComboBoxPeer.java (3)

131. ComboBoxPeer.java (4)

132. ComboBoxPeer.java (5)

133. AWT Files

134. Java Compilation

135. C Files

136. Create function

137. Create function (2)

138. Create function (3)

139. Create function (4)

140. Create function (5)

141. Create function (6)

142. Callback Function

143. Callback Function (2)

144. Returning Java strings

145. getString for MComboBoxPeer

146. Action Method in Peer

147. Conclusion