java学习图形界面(Java learning graphical interfaces).docVIP

  • 0
  • 0
  • 约8.92千字
  • 约 10页
  • 2017-08-31 发布于河南
  • 举报

java学习图形界面(Java learning graphical interfaces).doc

java学习图形界面(Java learning graphical interfaces)

java学习图形界面(Java learning graphical interfaces) The JAVA tutorial you are reading is: Java learning the first graphical interface. Learn a few days Java, can not wait to enter the graphical interface, because the graphical interface can give people a visual effect, if you write a notepad in line boring code can be turned into a beautiful figure, that is what kind of feel! Next, I will explain a drawing program in steps, for your reference. First, think of an interface to paint a program The interface above the program shown in the file menu screen, print and exit the function, the main function of this program is to complete the functions of drawing, as shown, can be painted red, green, blue, black graphics, optional graphics say there is a rectangular and oval, Filled function whether filled closed image. Before you start creating a graphical interface, first introduce the basics of creating graphics. Frame, also called a framework, is a framework running interface consisting of a maximized, minimized, closed, and Frame name. Panel, also called the panel, adding Panel in Frame can make many things easier to solve, which we will see later, as follows, is a 100 * 100 Panel was added to the 200 x 200 Frame interface, note that why Panel display is a rectangular box? This is because the origin selects the top left of the header line (0, 0). The Frame default layout manager for borderlayout, Panels default layout manager for flowlayout, the layout manager is divided into many kinds, the most common is flowlayout (FlowLayout), borderlayout (BorderLayout) and table layout manager (GridLayout). 1. stream layout manager is to put the components like water on the Frame or other components, from left to right, and then discharge, meet the boundary, then re start, in order to discharge, the overall placement in the central position. As shown below (this is to add Button to the Frame, because the default layout manager for Frame is not FlowLayout, so make the appropriate changes

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档