Ankith Reddy has Published 1070 Articles

How to set all the values at once using the model in a JProgressBar with Java?

Ankith Reddy

Ankith Reddy

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

57 Views

The getModel() method is used to set all the values at once for a JProgressBar −int newVal = 5; int newMin = 0; int newMax = 100; progressBar.getModel().setRangeProperties(newVal, 0, newMin, newMax, true);The following is an example to set all the values at once using the model in a progress bar ... Read More

8085 program to check whether both the nibbles of 8 bit number are equal or not

Ankith Reddy

Ankith Reddy

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

509 Views

Here we will see how to check whether two nibbles of a number are same or not.Problem StatementWrite 8085 Assembly language program to check whether upper nibble and lower nibbles are same or not.DiscussionTo check the nibbles, we have to mask at first. So we need to mask the lower ... Read More

HTML
autocomplete Attribute

Ankith Reddy

Ankith Reddy

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

96 Views

The autocomplete attribute of the element allows you to set whether the autocomplete for the form should be on or off. The web browser automatically fills the values if the autocomplete is on. This only happens if the user already entered values before.Following is the syntax −Above, on | ... Read More

Create a vertical slider with custom min, max, and initial value in Java

Ankith Reddy

Ankith Reddy

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

100 Views

While creating vertical 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 = 50; int min = 0; int max = 100;Set it to the slider ... Read More

HTML canvas stroke() Method

Ankith Reddy

Ankith Reddy

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

2K+ Views

The stroke() method of the HTML canvas is used to draw the path. This path is drawn with moveTo() and lineTo() method. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas ... Read More

How to get last 12 digits from a string in MySQL?

Ankith Reddy

Ankith Reddy

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

673 Views

You can use RIGHT() function from MySQL to get the last 12 digits from a string. Let us first create a table −mysql> create table DemoTable    (    Number varchar(200)    ); Query OK, 0 rows affected (0.59 sec)Insert records in the table using insert command −mysql> insert into ... Read More

8085 program to divide two 16 bit numbers

Ankith Reddy

Ankith Reddy

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

2K+ Views

Here we will see how to divide two 16 bit numbers using 8085.Problem StatementWrite 8085 Assembly language program to divide two 16-bit numbers.Discussion8085 has no division operation. To perform division, we have to use repetitive subtraction. To perform 16-bit division, we have to do the same but for the register ... Read More

How to set orientation and split components along x-axis in Java?

Ankith Reddy

Ankith Reddy

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

102 Views

Let us first create components to split. Here. We have two labels −JComponent one = new JLabel("Label One"); one.setBorder(BorderFactory.createLineBorder(Color.red)); JComponent two = new JLabel("Label Two"); two.setBorder(BorderFactory.createLineBorder(Color.blue));Now, set orientation and split along x-axis with HORIZONTAL_SPLIT −JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); split.setLeftComponent(one); split.setRightComponent(two);The following is an example to set orientation and split ... Read More

How to search a word by capital or small letter in MySQL?

Ankith Reddy

Ankith Reddy

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

333 Views

You can use BINARY along with the LIKE operator. Let us first create a table −mysql> create table DemoTable    (    Header text    ); Query OK, 0 rows affected (1.09 sec)Insert records in the table using insert command −mysql> insert into DemoTable values('Programming tutorials on MySQL'); Query OK, ... Read More

HTML DOM Style lineHeight Property

Ankith Reddy

Ankith Reddy

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

58 Views

The HTML DOM Style lineHeight property is used to set the line height, which is the distance between the lines in a text.Following is the syntax to set the lineHeight property −object.style.lineHeightFollowing is the syntax to return the lineHeight property −object.style.lineHeight = "normal|number|length|%|initial|inherit"Above, the values are described below −normal: Normal ... Read More

Advertisements