/**
* 画小菜单
* @param g 画笔
* @param st_w 文字数组
* @param x x坐标
* @param y y坐标
* @param i_wight 宽度
* */
public void paintLowMenu(Graphics g, String[] st_w, int x, int y, int i_wight) {
g.setClip(0, 0, 240, 320);
g.setColor(ColorSet.i_noButtenFrame);
g.fillRoundRect(x, y, i_wight, st_w.length * 20, 10, 10);
g.setColor(ColorSet.i_noButtenBG);
g.fillRoundRect(x + 2, y + 2, i_wight - 4, st_w.length * 20 - 4, 10, 10);
for (int i = 0; i < st_w.length; i++) {
if (i != 0) {
g.setColor(ColorSet.i_noButtenFrame);
g.drawLine(x, y + i * 20, x + i_wight - 2, y + i * 20);
}
g.setColor(ColorSet.i_noButtenFont);
g.drawString(st_w[i], x + 5, y + (i * 20) + 1, 20);
}
}
此方法还有诸多的局限性,仅供各位参考。