我是第二年级学生,我正在开发我的OOP项目(计算器)。我完成了数字按钮和运算符的功能。现在我正在重新安排我的按钮。起初,我只是将我的按钮尺寸设置为(50,50),它的工作正常,它的标签仍然可见,但是当我决定将其缩小(30,30)时,它的标签变成了“...” 。无法看到Java GUI按钮的标签
这里的PIC:
而且我的继承人代码:
lblEdit.setBounds(-138,-5,180,50);
lblView.setBounds(-90,-5,180,50);
lblHelp.setBounds(-40,-5,180,50);
txt.setBounds(15,35,250,30); // text pane
txt2.setBounds(0,330,100,20);
blank.setBounds(15,80,30,30); // this is just an extra button, no use at all, OK? :D
btnMC.setBounds(15,115,30,30);
btnMR.setBounds(15,150,30,30);
btnMS.setBounds(15,185,30,30);
btnMp.setBounds(15,220,30,30);
可能重复(http://stackoverflow.com/questions/7971178/find-out-if-text-of-jlabel-exceeds-label-大小) – ziesemer 2013-02-24 05:55:56