void | add(Component) 加入元件。 |
float | getAlignmentX() 取得水平方向的對齊方式,0.0 為左,0.5 為中,1.0 為右。 |
float | getAlignmentY() 取得垂直方向的對齊方式,0.0 為上,0.5 為中,1.0 為下。 |
Component | getComponentAt(int x, int y) 檢查座標位置使否有元件,有的話傳回該元件。 |
Component | getComponentAt(Point) 檢查座標位置使否有元件,有的話傳回該元件。 |
Graphics | getComponentGraphics(Graphics) 將元件的外貌以圖形傳回。 |
Locale | getDefaultLocale() 取得時區語系。 |
Graphics | getGraphics() 取得繪圖區間。 |
int | getHeight() 取得高度。 |
Point | getLocation(Point) 取得左上角座標位置。 |
String | getName() 取得名稱。 |
JRootPane | getRootPane() 傳回 JRootPane。 |
Dimension | getSize() 取得目前尺寸。 |
Rectangle | getVisibleRect() 取得可見的矩形範圍。 |
int | getWidth() 取得寬度。 |
int | getX() 取得水平座標位置。 |
int | getY() 取得垂直座標位置。 |
void | invalidate() 使元件無效。 |
boolean | isDisplayable() 元件是否為可見的;有些元件看不到,例如計時器。 |
boolean | isEnabled() 元件是否已經啟用。 |
boolean | isShowing() 元件是否已經顯示。 |
boolean | isValid() 元件是否有效。 |
void | paint(Graphics) 繪圖區間繪製。 |
void | remove(Component) 移除所指定元件。 |
void | removeAll() 移除所有加入的元件。 |
void | removeNotify() 銷毀元件。 |
void | repaint() 重新繪製。 |
void | requestFocus() 請求獲得駐點。 |
void | revalidate() 使元件重新生效;相當於先 invalidate() 再 validate()。 |
void | setAlignmentX(float) 設定水平方向的對齊方式,0.0 為左,0.5 為中,1.0 為右。 |
void | setAlignmentY(float) 設定垂直方向的對齊方式,0.0 為上,0.5 為中,1.0 為下。 |
void | setBackground(Color) 設定背景顏色。 |
void | setBounds(int x, int y, int w, int h) 設定尺寸與位置。 |
void | setBorder(Border) 設定邊框樣式 |
void | setCursor(Cursor) 設定滑鼠游標。 |
void | setDefaultLocale(Locale) 設定時區語系。 |
void | setDoubleBuffered(boolean) 設定雙重緩衝繪圖機制。 |
void | setEnabled(boolean) 設定物件是否啟用。 |
void | setFont(Font) 設定字型。 |
void | setForeground(Color) 設定前景顏色。 |
void | setLayout(LayoutManager) 設定元件排列模式。 |
void | setName(String) 為元件命名。 |
void | setOpaque(boolean) 設定是否繪製邊界內的像素;設為 false 的話有透明效果。 |
void | setSize(int w, int h) 設定長寬尺寸。 |
void | setToolTipText(String) 設定提示文字。 |
void | setUI(ComponentUI) 設定物件外觀。 |
void | setVisible(boolean) 設定物件是顯示或隱藏。 |
void | updateUI() 更新物件的外觀。 |
void | update(Graphics) 更新物件的顯示狀態。 |
void | validate() 使元件生效。 |