
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 996 Articles

Ankith Reddy
774 Views
Let’s first see how we set text in a components tooltip −JLabel label3 = new JLabel("Password", SwingConstants.CENTER); label3.setToolTipText("Enter Password");To display multiple lines of text in a tooltip, use . Here, we have used the HTML tag for new line and that would create multiple lines of text in the ... Read More

Ankith Reddy
1K+ Views
If you have done little-bit of programming in python, you have seen the word “**args” and “**kwargs” in python functions. But what exactly they are?The * and ** operators did different operations which are complementary to each other depending on where we are using them.So when we are using them ... Read More

Ankith Reddy
142 Views
The HTML DOM Anchor origin property returns the protocol, hostname and port number of the href attribute value, for example, https://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 ... Read More

Ankith Reddy
341 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
2K+ 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
139 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
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
542 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
294 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
315 Views
To create two borders for a single component, use the createCompoundBorder() method in Java. Here, we have created LineBorder nd TitledBorder −LineBorder lineBorder = new LineBorder(Color.red); TitledBorder titleBorder = new TitledBorder("Demo Title"); Border border = BorderFactory.createCompoundBorder(lineBorder, titleBorder);Now, set both the borders for a single component −JButton button = new JButton("two ... Read More