这里遇到了一个难题:我需要将图像转换为JScrollPane。应该很简单,但是我有点迷路了。
JSplitPane pane1;
pane1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
new JLabel("hi"),
(new JLabel(new ImageIcon(image))));发布于 2012-11-20 05:28:44
你可以这样做:
pane1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JLabel("hi"),
(new JScrollPane(new JLabel(new ImageIcon(image)))));https://stackoverflow.com/questions/13462513
复制相似问题