Swing 是否将JTextArea添加到JMapViewer?
我们可以将JTextArea添加到JMapViewer吗?差不多Swing 是否将JTextArea添加到JMapViewer?,swing,jmapviewer,Swing,Jmapviewer,我们可以将JTextArea添加到JMapViewer吗?差不多 JMapViewer map() = new JMapViewer(); map.add(new JTextArea(10,10)); 另一个解决方法是将其添加到JFrame/JInternalFrame中的GridBagLayout中,但我想知道是否可以在地图中显示文本?尝试时发生了什么;-)就像你做textArea.setText(“Wie-Gehts?”)一样,它只显示一个灰色屏幕,里面没有文本。
JMapViewer map() = new JMapViewer();
map.add(new JTextArea(10,10));
另一个解决方法是将其添加到JFrame/JInternalFrame中的GridBagLayout中,但我想知道是否可以在地图中显示文本?尝试时发生了什么;-)就像你做textArea.setText(“Wie-Gehts?”)一样,它只显示一个灰色屏幕,里面没有文本。