/JavaOnOffButton

Java with On/Off Button Implement

Primary LanguageJava

JavaSwButton


On-Off cases;

Alt text

Alt text

Description

We give the names of the Switch button object as a parameter.

Alt text

The initial state of button;

Alt text

We set the size of the button with setBounds.

The size of the button (callBtnWidth,callBtnHeight) you can change this by assigning the value of.

Alt text

• There are three parameters of the font.

• The first parameter is the font face, Second parameter is the font style, Third parameter is the font size.

• The third parameter according to the size of the button text assign.

Alt text

Alt text

All code;

Alt text

Error! Check the font size.

Alt text

If very large data size of the text, you receive an error.

You can try and overcome this state.