
awt
文章平均质量分 66
「已注销」
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
e582. Drawing with Color
public void paint(Graphics g) { Graphics2D g2d = (Graphics2D)g; // Use a predefined color g2d.setColor(Color.red); // Draw shapes...; see e586 Drawing Simple ...转载 2018-09-02 22:06:49 · 191 阅读 · 0 评论 -
e583. Drawing with a Gradient Color
public void paint(Graphics g) { Graphics2D g2d = (Graphics2D)g; Color startColor = Color.red; Color endColor = Color.blue; // A non-cyclic gradient ...转载 2018-09-02 22:07:23 · 135 阅读 · 0 评论 -
e584. Retrieving a Predefined Color by Name
The Color class contains a number of predefined colors such as red and green. This example demonstrates how to retrieve one of these predefined colors using a string. For example, the predefined color...转载 2018-09-02 22:07:49 · 235 阅读 · 0 评论 -
e576. Drawing with Alpha
// See e575 The Quintessential Drawing Program public void paint(Graphics g) { Graphics2D g2d = (Graphics2D)g; // Draw background... // Set alpha. 0.0f is 1...转载 2018-09-02 22:08:16 · 198 阅读 · 0 评论 -
e570. Determining When a Component Has Been Made Visible, Moved, or Resized
A component fires a component event after it is made visible, hidden, moved, or resized. // Create a listener for component events ComponentListener listener = new ComponentAdapter() { ...转载 2018-09-02 22:08:45 · 174 阅读 · 0 评论 -
e571. Creating a Container
A container holds one or more child components. A container has a layout that determines how the child components are arranged within the container. This example creates a frame with a text area in th...转载 2018-09-02 22:09:23 · 201 阅读 · 0 评论 -
e573. Determining When a Component Is Added or Removed from a Container
A container fires a container event whenever a component is added or removed. // Create a listen for container events ContainerListener listener = new ContainerAdapter() { public v...转载 2018-09-02 22:09:52 · 247 阅读 · 0 评论 -
e572. Getting the Child Components of a Container
This example retrieves all of a container's children in an array: // Get children Component[] components = container.getComponents(); for (int i=0; i<components.length; i++) {...转载 2018-09-02 22:10:26 · 245 阅读 · 0 评论