- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Chandu yadav has Published 1163 Articles
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
467 Views
Python object oriented programming allows variables to be used at the class level or the instance level where variables are simply the symbols denoting value you’re using in the program. At the class level, variables are referred to as class variables whereas variables at the instance level are referred to as ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
120 Views
The HTML DOM Anchor href property is used to set or return the href attribute. It returns the url of the link.Following is the syntax to set the anchor href property−anchorObj.href = URLAbove, URL is the url of the link. It can be an absolute, relative or anchor link with ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
567 Views
In this section we are going to create a Whatsapp chatbots, but unlike few other chatbots for twitter or facebook, whatsapp chatbots don’t run on the platform directly because of whatsapp’s policies.But there is a way to get is done, using selenium, a very smart package in python with which ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
1K+ Views
Use the UIManager to customize the MenuBar:JMenuBar menuBar = new JMenuBar(); UIManager.put("MenuBar.background", Color.ORANGE);We have used the following above to update the background color of the MenuBar:UIManager.put("MenuBar.background", Color.ORANGE);The following is an example to customize MenuBar and change the background color:package my; import java.awt.Color; import java.awt.event.KeyEvent; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
1K+ Views
Let us first create a MenuBar −JMenuBar menuBar = new JMenuBar(); UIManager.put("MenuBar.background", Color.ORANGE);To create a submenu for a Menu, the following is an example −Examplepackage my; import java.awt.Color; import java.awt.event.KeyEvent; import javax.swing.ButtonGroup; import javax.swing.JCheckBoxMenuItem; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JRadioButtonMenuItem; import javax.swing.UIManager; public class SwingDemo { ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
77 Views
The size attribute of the element is used to set the number of visible list items from a drop-down list. A scrollbar would get added if the size is set more than 1.Following is the syntax−Above, num is the count of the visible list items in the drop-down list.Let ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
2K+ Views
Use the JComboBox to add a combo box to a table -JComboBox comboBox = new JComboBox();Now, add the combo box items -comboBox.addItem("Asia"); comboBox.addItem("Europe"); comboBox.addItem("North America"); comboBox.addItem("South America");Now, use the TableColumn and set the column wherein you want to set the above ComboBox items -TableColumn testColumn = table.getColumnModel().getColumn(0);Set the editor with ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
581 Views
To expand JTree row to display all the nodes and child nodes, use the expandRow() method in Java. At first, create a node −DefaultMutableTreeNode node = new DefaultMutableTreeNode("Project");Now, add nodes to the node created above −DefaultMutableTreeNode node1 = new DefaultMutableTreeNode("App"); DefaultMutableTreeNode node2 = new DefaultMutableTreeNode("Website"); DefaultMutableTreeNode node3 = new DefaultMutableTreeNode("WebApp"); ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
97 Views
Set a MatteBorder from BorderFactory class −MatteBorder border = (MatteBorder)BorderFactory.createMatteBorder(2, -1, 5, 10, icon);Now, set the above created MatteBorder to a component −JButton button = new JButton("Matte Border"); button.setBorder(border);The following is an example to set a MatteBorder from BorderFactory class −Examplepackage my; import java.awt.BorderLayout; import java.awt.Container; import javax.swing.BorderFactory; import javax.swing.ImageIcon; ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
Chandu yadav
811 Views
To set the grid color of a table, use the setGridColor() method.table.setGridColor(Color.yellow);Above, we have used the Color class to set the color.The following is an example to set the grid color of a table −Examplepackage my; import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.border.TitledBorder; ... Read More