- 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
209 Views
You can use length() from MySQL to find the size of text stores in a specific column. Let us first create a tablemysql> create table DemoTable ( CustomerName longtext ); Query OK, 0 rows affected (0.67 sec)Insert records in the table using insert command −mysql> insert into ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
2K+ Views
This example demonstrate about How do I get the resource id of an image if I know its name in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
315 Views
The IF() function returns a value based on a condition.The syntax is as follows−SELECT IF(yourCondition, yourMessageIfConditionBecomesTrue, yourMessageIfConditionBecomesFalse) from yourTableName; Let us first create a table: mysql> create table DemoTable ( Value int ); Query OK, 0 rows affected (0.60 sec)Insert records in the table using insert command ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
95 Views
Use the getPreviousLeaf() method to get the previous leaf in a JTree. Here, we are displaying the leaf before this node “eight” on Console -System.out.println("Get Previous Leaf = "+eight.getPreviousLeaf());The following is an example to get the previous leaf from a JTree -Examplepackage my; import javax.swing.JFrame; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; public ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
420 Views
This example demonstrate about How to disable action bar permanently in Android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.java Step 3 ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
243 Views
Use the getNextSibling() method to get the next sibling. Here, we are getting the next sibling of child node “five” and displaying on Console −System.out.println("Get Next Sibling = "+five.getNextSibling());The following is an example to get the next sibling in a JTree −Examplepackage my; import javax.swing.JFrame; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; public ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
1K+ Views
In order to get last day of current year, you can use LAST_DAY() from MySQL. The syntax is as follows−SELECT LAST_DAY(DATE_ADD(CURDATE(), INTERVAL 12-MONTH(CURDATE()) MONTH));Let us implement the above syntax to know the last day of current year−mysql> SELECT LAST_DAY(DATE_ADD(CURDATE(), INTERVAL 12-MONTH(CURDATE()) MONTH));This will produce the following output −+-------------------------------------------------------------------+ | LAST_DAY(DATE_ADD(CURDATE(), ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
175 Views
Create a JTextBox first −JTextField textField = new JTextField();Set the above JTextFile for the Default Cell Editor −TreeCellEditor editor = new DefaultCellEditor(textField); tree.setEditable(true); tree.setCellEditor(editor);The following is an example to create a default cell editor with textbox −Examplepackage my; import javax.swing.DefaultCellEditor; import javax.swing.JFrame; import javax.swing.JTextField; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.TreeCellEditor; ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
3K+ Views
To make a canvas with Java Swing, use the Graphics2D class −public void paint(Graphics g) { Graphics2D graphic2d = (Graphics2D) g; graphic2d.setColor(Color.BLUE); graphic2d.fillRect(100, 50, 60, 80); }Above, we have created a rectangle and also added color to it.The following is an example to make a canvas in ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
Ankith Reddy
123 Views
The HTML DOM activeElement property is a read-only property to return the currently focused element in the document.Following is the syntax −document.activeElementLet us now see an example to implement the DOM activeElement property −Example Live Demo Heading Two Click in the element to get the active element. ... Read More