- 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
Ankith Reddy has Published 1070 Articles
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
957 Views
Generally, the data type of an expression depends on the types of the arguments. This rule is applied to most of the operators: like when we add two integers ,the result should be an integer. However, in case of division this doesn’t work out well because there are two different ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
3K+ Views
Python logical operator “and” and “or” can be applied on strings. An empty string returns a Boolean value of False. Let’s first understand the behaviour of these two logical operator “and” and “or”.And operator Return the first falsey value if there are any, else return the last value in the expression ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
84 Views
The HTML DOM Anchor origin property returns the protocol, hostname and port number of the href attribute value, for example, http://www.demo.com:6064 Following is the syntax−anchorObj.originLet us now see an example to implement the DOM Anchor origin property −Example Live Demo Company Products Display href Part Display origin Display hreflang ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
245 Views
Create a combo box first and set some values −JComboBox comboBox = new JComboBox(new String[]{"Product1", "Product2", "Product3", "Product4"});Seth the JComboBox for the editor so that the editor uses the combo box −TreeCellEditor editor = new DefaultCellEditor(comboBox); tree.setEditable(true); tree.setCellEditor(editor);The following is an example to create a Default Cell Editor that uses ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
1K+ Views
To change the table header font, you need to first get the header -JTableHeader tableHeader = table.getTableHeader();Now, use the Font class to set the new font. Here, we have set the font face to be Verdana, style as PLAIN and font size as 14 -Font headerFont = new Font("Verdana", Font.PLAIN, ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
82 Views
The HTML DOM Anchor port property is used to set or return the port of the href attribute.Following is the syntax to set the port property−anchorObj.port = numAbove, num is the port number of the url.Following is the syntax to return the port property−anchorObj.portLet us now see an example to ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
2K+ Views
Unlike C/C++ Long in Python 3 have unlimited precision and there is no explicitly defined limit. The amount of available address space considered to be the practical limit.In python 2, integers will automatically switch to longs when they grown beyond their limit −Python 2>>> import sys >>> type(sys.maxint) >>> ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
359 Views
To add empty border to a component, use the BorderFactory class createEmptyBorder() method −Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 0);To set the above border to a component, use the setBorder() method −JButton button = new JButton("Empty Border"); button.setBorder(emptyBorder);The following is an example to ad empty border to a JButton −Examplepackage ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
211 Views
Let’s say the following is our table −String[][] rec = { { "1", "Steve", "AUS" }, { "2", "Virat", "IND" }, { "3", "Kane", "NZ" }, { "4", "David", "AUS" }, { "5", "Ben", "ENG" }, { "6", "Eion", "ENG" }, }; String[] header ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
228 Views
To display both horizontal and vertical grid lines in a table, use the setShowGrid() method and set it to true −table.setShowGrid(true);The following is an example to display both horizonal and vertical grid lines in a JTable −Examplepackage my; import java.awt.Color; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; public class ... Read More