This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: • int getWidth() • int getx() • int gety() • int getName() • Color getBackground() • Color getForeground() • boolean isEnabled() • boolean isVisible() 2 All components also inherit • Component add(Component c) , and • void setlayout(LayoutManager layoutManager) from Container. A button is certainly one of the most commonly utilized Components. We have already used buttons in several layout applications, we will begin our discussion of Swing components with JButton. Like every class that extends Component and Container, JButton inherits the methods of these two super classes. We will discuss JButton in our next lecture. (See further details on these classes in the Java API.) 3...
View Full Document
- Spring '08
- Object-Oriented Programming, component video, component, int width