14.Swing’s JFrame form

Swing AWT only has brushes, but Swing can draw pictures, and it can also do drop-down boxes, selection boxes, and a series of more advanced things. window, panel 1 package com.gui.lesson4; 2 3 import javax.swing.*; 4 import java.awt.*; 5 6 public class JFrameDemo { 7 8 //init(); initialization 9 public void init() { 10 //Top-level […]

GUI JFrame actual combat: June 1st, if you love her, draw a Doraemon for her

Article directory foreword Technology accumulation container classification main API Graphics image painting method Combat demonstration 1. Create a Doraemon rendering class 2. Create a test method 3. View the rendering results write at the end Foreword I believe that many students who use the high-level JAVA language know the GUI graphical user interface. Developers can […]

JFrame realizes simple thunder fighter

1. Project Introduction Through the methods in the JFrame class in the JAVA language, a simple thunder fighter game is realized. The functions include aircraft movement, firing bullets, generating enemy aircraft and destroying enemy aircraft, etc. 2. Project Analysis Module 1: Player Aircraft Module To realize this simple game, the player’s plane is essential. We […]

[Java AWT Graphical Interface Programming] Draw super large pictures in Canvas ( use mouse to drag to view full picture | set JFrame window to close automatically | get and draw pictures | mouse drag to calculate displacement | canvas offset )

Article directory 1. The main points of drawing super large pictures in Canvas 1. Set the JFrame window to close automatically 2. Obtain and draw pictures 3. Drag the mouse to calculate the displacement 4. Canvas Offset 2. Code example 1. Key points for drawing super large pictures in Canvas 1. Set the JFrame window […]