
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
Arjun Thakur has Published 1025 Articles

Arjun Thakur
180 Views
Use BETWEEN clause to search between columns. Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Score1 int, Score2 int ); Query OK, 0 rows affected (0.78 sec)Insert some records in the table using insert command ... Read More

Arjun Thakur
922 Views
To determine when a Window is opened in Java, use the WindowListener, which is the listener interface for receiving window events..WindowListener listener = new WindowAdapter() { public void windowOpened(WindowEvent evt) { Frame frame = (Frame) evt.getSource(); System.out.println("Opened "+frame.getTitle()); } };Above, we have ... Read More

Arjun Thakur
241 Views
The width attribute of the element is only used with image and allows you to set the width of the image added using −The width attribute introduced in HTML5 and acts as the submit button. Following is the syntax −Above, width represents the width in pixels.Let us now see ... Read More

Arjun Thakur
604 Views
For this, you can use COLLATE. Following is the syntax −select *from yourTableName where yourColumnName LIKE yourValue COLLATE utf8_bin;Let us first create a table −mysql> create table DemoTable ( LastName varchar(100) ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command ... Read More

Arjun Thakur
583 Views
Let’s say we have 6 components and we need to fill the space between some of them −JButton button1 = new JButton("CSK"); JButton button2 = new JButton("DC"); JButton button3 = new JButton("MI"); JButton button4 = new JButton("SRH"); JButton button5 = new JButton("RR"); JButton button6 = new JButton("KKR");To fill the space ... Read More

Arjun Thakur
1K+ Views
For this, use the CASE statement. Let us first create a table −mysql> create table DemoTable ( Number int ); Query OK, 0 rows affected (0.83 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10); Query OK, 1 row affected (0.17 sec) ... Read More

Arjun Thakur
2K+ Views
To enable row selection, use the setRowSelectionAllowed () method and set it to TRUE −table.setCell setRowSelectionAllowed(true);The following is an example to enable row selection in a JTable −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; public class SwingDemo { public static ... Read More

Arjun Thakur
172 Views
You can use the field() for this. Let us first create a table −mysql> create table DemoTable ( Value int ); Query OK, 0 rows affected (0.80 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10); Query OK, 1 row affected (0.18 ... Read More

Arjun Thakur
440 Views
For this, set the layout orientation to the following −setLayoutOrientation(JList.VERTICAL_WRAP);The following is an example to display the JList items from top to bottom and left to right −Examplepackage my; import java.awt.BorderLayout; import java.util.ArrayList ; import java.util.List; import javax.swing.JFrame; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; public class SwingDemo { public ... Read More

Arjun Thakur
698 Views
To create Message Pop-ups, use the following JOptionPane −JOptionPane.showMessageDialogWe are displaying a tree inside the message pop-ups. The following is an example to create Message Pop-Ups with Java −Examplepackage my; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; public class SwingDemo { public static void main(String[] args) ... Read More