George John has Published 1081 Articles

How to create a horizontal slider with custom min, max, and initial value in Java

George John

George John

Updated on 30-Jul-2019 22:30:26

270 Views

While creating horizontal slider, we can set custom values as well. Let us take three integer variable and set the int values for min, max as well as the initial value of the slider −int val = 75; int min = 0; int max = 100;Set it to the slider ... Read More

HTML href Attribute

George John

George John

Updated on 30-Jul-2019 22:30:26

189 Views

The href attribute of the element sets the the hyperlink target. Following is the syntax −Above, URL is the hyperlink you need to mention for the area, which can be a relative link, absolute link, script, protocol, etc.Let us now see an example to implement the href attribute of ... Read More

Display only the horizontal scrollbar in Java

George John

George John

Updated on 30-Jul-2019 22:30:26

542 Views

To display only the horizontal scrollbar, use the VERTICAL_SCROLLBAR_NEVER constant, which eventually displays only the horizontal scrollbar.The following is an example to display only the horizontal scrollbar in Java −Examplepackage my; import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.Box; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JScrollPane; public class SwingDemo {    public static ... Read More

8085 program to find the element that appears once

George John

George John

Updated on 30-Jul-2019 22:30:26

501 Views

In this program we will see how to find a number who appears only once in an array of elements.Problem StatementWrite 8085 Assembly language program to find a number who appears only once in an array of elements. The size of the array is stored at location F100; the numbers ... Read More

HTML disabled Attribute

George John

George John

Updated on 30-Jul-2019 22:30:26

158 Views

The disabled attribute of the is used to disable an option-group. After that, the option-group becomes unclickable. Following is the syntax −Let us now see an example to implement the disabled attribute of the element −Example Live Demo Water Levels Impurity Level       ... Read More

8085 program to find the set bit of accumulator

George John

George John

Updated on 30-Jul-2019 22:30:26

444 Views

Here we will see how to find the place of the set bit of the Accumulator data.Problem StatementWrite 8085 Assembly language program to find the position where the bit is 1. In the accumulator all bits are 0, but only one bit is 1. We have to get the position ... Read More

MySQL query to select all fields beginning with a given number with next character a letter?

George John

George John

Updated on 30-Jul-2019 22:30:26

394 Views

You can use REGEXP for this. Let us first create a table −mysql> create table DemoTable    (    Value text    ); Query OK, 0 rows affected (1.28 sec)Insert records in the table using insert command −mysql> insert into DemoTable values('645st'); Query OK, 1 row affected (0.25 sec) mysql> ... Read More

How to add JTable to Panel in Java Swing?

George John

George John

Updated on 30-Jul-2019 22:30:26

3K+ Views

To add JTabel to Panel, let us first crerate a panel −JPanel panel = new JPanel();Now, create JTable and add rows and columns with the records −String[][] rec = {    { "1", "Steve", "AUS" },    { "2", "Virat", "IND" },    { "3", "Kane", "NZ" },    { ... Read More

8086 program to determine squares of numbers in an array of n numbers

George John

George John

Updated on 30-Jul-2019 22:30:26

3K+ Views

In this program we will see how to find the squares of n numbers stored in an array.Problem StatementWrite 8086 Assembly language program to calculate square of each numbers stored in an array of size n. The array size is stored at location offset 600, and Numbers are stored at ... Read More

HTML colspan Attribute

George John

George John

Updated on 30-Jul-2019 22:30:26

413 Views

The colspan attribute of the element is used to set the number of columns a header cell should span.Following is the syntax −Above, num is the count of columns a header cell should span.Let us now see an example to implement the colspan attribute of the element −Example Live ... Read More

Advertisements