选至jdk文档 void setBorderPainted(boolean b) Sets whether the border should be painted. static void setDefaultLightWeightPopupEnabled(boolean aFlag) Sets the default value of the lightWeightPopupEnabled property. void setInvoker(Component invoker) Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed. void setLabel(String label) Sets the popup menu's label. void setLightWeightPopupEnabled(boolean aFlag) Sets the value of the lightWeightPopupEnabled property, which by default is true. void setLocation(int x, int y) Sets the location of the upper left corner of the popup menu using x, y coordinates. void setPopupSize(Dimension d) Sets the size of the Popup window using a Dimension object. void setPopupSize(int width, int height) Sets the size of the Popup window to the specified width and height. void setSelected(Component sel) Sets the currently selected component, This will result in a change to the selection model. void setSelectionModel(SingleSelectionModel model) Sets the model object to handle single selections. void setUI(PopupMenuUI ui) Sets the L&F object that renders this component. void setVisible(boolean b) Sets the visibility of the popup menu. void show(Component invoker, int x, int y) Displays the popup menu at the position x,y in the coordinate space of the component invoker. void updateUI() Resets the UI property to a value from the current look and feel.
Sets whether the border should be painted.
static void setDefaultLightWeightPopupEnabled(boolean aFlag)
Sets the default value of the lightWeightPopupEnabled property.
void setInvoker(Component invoker)
Sets the invoker of this popup menu -- the component in which the popup menu menu is to be displayed.
void setLabel(String label)
Sets the popup menu's label.
void setLightWeightPopupEnabled(boolean aFlag)
Sets the value of the lightWeightPopupEnabled property, which by default is true.
void setLocation(int x, int y)
Sets the location of the upper left corner of the popup menu using x, y coordinates.
void setPopupSize(Dimension d)
Sets the size of the Popup window using a Dimension object.
void setPopupSize(int width, int height)
Sets the size of the Popup window to the specified width and height.
void setSelected(Component sel)
Sets the currently selected component, This will result in a change to the selection model.
void setSelectionModel(SingleSelectionModel model)
Sets the model object to handle single selections.
void setUI(PopupMenuUI ui)
Sets the L&F object that renders this component.
void setVisible(boolean b)
Sets the visibility of the popup menu.
void show(Component invoker, int x, int y)
Displays the popup menu at the position x,y in the coordinate space of the component invoker.
void updateUI()
Resets the UI property to a value from the current look and feel.
所以后来就用setBackground(),setBorder()进行了修改。
对GUI组件还不熟悉,呵呵。