
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
115 Views
To set scrollbars to never appear, use the JScrollPane.HORIZONTAL_SCROLLBAR_NEVER and JScrollPane.VERTICAL_SCROLLBAR_NEVER. Let’s say you created a Box with some button components. Now, create a JScrollPane:JScrollPane scrollPane = new JScrollPane();Set the Viewport view as Box:scrollPane.setViewportView(box);Now, set the scrollbars to never appear:scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);The following is an example to set scrollbars to never ... Read More

Ankith Reddy
174 Views
The width attribute of the element is used to set the width of the canvas in pixels. Following is the syntax −Above, pixels_val is the width set in pixels. Let us now see an example to implement the width attribute of the element −Example Live Demo ... Read More

Ankith Reddy
5K+ Views
This example demonstrate about How to limit text length of EditText 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.xml. Step ... Read More

Ankith Reddy
2K+ Views
This example demonstrate about How to lock the Android device 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.xml Step 3 − ... Read More

Ankith Reddy
2K+ Views
This example demonstrate about How to check Android Phone Model 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.xml. Step 3 − ... Read More

Ankith Reddy
6K+ Views
This example demonstrate about How to get current foreground activity context 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 following code to src/MyApp.javapackage app.tutorialspoint.com.sample ; import android.app.Activity ... Read More

Ankith Reddy
1K+ Views
This example demonstrate about How can I validate EditText input 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
248 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
3K+ 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
433 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