AWT Button

Change AWT Button Font Example

Example Output

Want to learn quickly?
Try one of the many quizzes. More than Java 400 questions with detailed answers.


  • OpenJDK-8-jdk: javac compile without error.
    Java ChangeButtonFontExample output error:

    [email protected]:~/JDK8/AWT$ java ChangeButtonFontExample
    Error: Main method not found in class ChangeButtonFontExample, please define the main method as:
    public static void main(String[] args)
    or a JavaFX application class must extend javafx.application.Application
    [email protected]:~/JDK8/AWT$

    Please, help me.

    • Understood… It is necessary to start in the browser which supports Java Applet.
      It is necessary to create a file: ChangeButtonFontExample.html и открыть его в браузере:


      If your browser was Java-enabled, a “ChangeButtonFontExample” message would appear here.


Facebook Fans