It inherits the JComponent class and provides space for an application which can attach any other component. It is used to add scroll bar, both horizontal and vertical. JTextField b = new JTextField("edureka") It inherits the JTextComponent class and it is used to allow editing of single line text. It inherits the AbstractButton class and is platform independent. Using the ActionListener it will result in some action when the button is pushed. Following are a few components with examples to understand how we can use them. Containers like JFrame and JDialog can only add a component to itself. Methods like setLayout override the default layout in each container. Basic swing components are the building blocks of any gui application. Containers are the windows like frame and dialog boxes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |