George John has Published 1167 Articles

Display only the horizontal scrollbar in Java

George John

George John

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

386 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

319 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

101 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

334 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

299 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

2K+ 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

2K+ 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

334 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

8085 program to subtract two BCD numbers

George John

George John

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

3K+ Views

Here we will see how to perform BCD subtractions using 8085.Problem StatementWrite 8085 Assembly language program to perform BCD subtractions of tow numbers stored at location 8001 and 8002. The result will be stored at 8050 and 8051.DiscussionTo subtract two BCD numbers, we are going to use the 10s complement ... Read More

How to display horizontal grid lines in a JTable with Java?

George John

George John

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

646 Views

To display horizontal grid lines in a table, use the setShowHorizontalLines() method and set it to TRUE. Let us first create a table −String[][] rec = {    { "1", "Steve", "AUS" },    { "2", "Virat", "IND" },    { "3", "Kane", "NZ" },    { "4", "David", "AUS" ... Read More

Advertisements