
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
6K+ Views
This example demonstrate about How to align views at the bottom of the screen 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 ... Read More

Arjun Thakur
738 Views
This example demonstrate about How to make an Android device vibrate programmatically.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

Arjun Thakur
814 Views
You can use CONCAT() function for this. Let us first create a table −mysql> create table DemoTable ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(100) ); Query OK, 0 rows affected (0.43 sec)Insert records in the table using insert command −mysql> insert into DemoTable(UserName) ... Read More

Arjun Thakur
238 Views
This example demonstrate about How to use AutoCompleteTextView in Android App.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

Arjun Thakur
346 Views
For a List Spinner, use the SpinnerListModel class. At first, let us set a list −SpinnerListModel list = new SpinnerListModel(new String[] { "Football", "Cricket", "Hockey", "Squash", "Fencing" });Now, set it and create a new JSpinner −JSpinner spinner = new JSpinner(list);The following is an example to create a List Spinner −Examplepackage ... Read More

Arjun Thakur
3K+ Views
Let’s say the following is our JTextPane −JTextPane textPane = new JTextPane();Now, set the font style for some of the text −SimpleAttributeSet attributeSet = new SimpleAttributeSet(); StyleConstants.setItalic(attributeSet, true); textPane.setCharacterAttributes(attributeSet, true); textPane.setText("Learn with Text and ");For rest of the text, set different color −StyledDocument doc = textPane.getStyledDocument(); Style style = textPane.addStyle("", ... Read More

Arjun Thakur
433 Views
You can exclude a specific record in SQL using not equal to operator(!=). Let us first create a table−mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, ClientName varchar(20), ClientCountryName varchar(10) ); Query OK, 0 rows affected (0.64 sec)Insert records in the ... Read More

Arjun Thakur
4K+ Views
Let us first set a JList and add items −List myList = new ArrayList(10); for (int index = 0; index < 20; index++) { myList.add("List Item " + index); }Now, we will set the above list to a new list −final JList list = new JList(myList.toArray(new String[myList.size()]));Now, set the ... Read More

Arjun Thakur
644 Views
To select the first column in a JTable, use the setColumnSelectionInterval() method. Here, set the indexes as interval for one end as well as other end.For the first column, set the range as 0 and 0 since we want to only select the first column with index 0 −table.setColumnSelectionInterval(0, 0);The ... Read More

Arjun Thakur
267 Views
Yes, we can use all of them in a single query. Let us first create a table −mysql> create table DemoTable ( StudentId int, StudentFirstName varchar(20), StudentLastName varchar(20), StudentAge int ); Query OK, 0 rows affected (0.53 sec)Insert records in the table using insert ... Read More