我一直在研究一个将自定义JComponents绘制到JLayeredPane上的程序,但是对组件上的repaint()的所有调用似乎什么都不做,但是在重新调整窗口大小时paintComponent方法会自动调用。 我一直在关注一些这里给出的建议: Why is paint()/paintComponent() never called? 但没有一个解决方案似乎解决我的问题,在美国东部时间更新Swi
这段代码显示的JLayeredPane显示我波形内滚动窗格: var scrollPane = new JScrollPane
var waveform = new Waveform(trackModel) // JPanel with waveform
scrollPane.setViewportView(waveform)
,这表明我的ScrollPane只是一个灰色的背景: var
我试图逐步建立一个基于用户输入的图像。我想要做的是创建一堆图形并将它们添加为图层,但是我遇到了一些问题,因为它们不会显示出来。下面是我使用的代码: public class ClassA
{
protected final static int dimesionsY = 1000;
private static int dimesionsX;
private sta