在Python中,我正在使用list(itertools.permutations("0123456789")),我收到(我按预期)一个单元字符串元组的列表.
有没有办法将该结果转换为字符串列表,而不迭代所有3628800项?
我有一个 JTable,它比它所包含的 JScrollPane 更宽(基本上是这样定义的):
JTable table = new JTable(model);
// I change some things like disallowing reordering, resizing,
// disable column selection, etc.
// I set the default renderer to a DefaultTableCellRenderer
// getTableCellRendererComponent, and then changes the color
// of the cell text depending on the cell value
JPanel panel = new JPanel(new BorderLayout(0, 5));
panel.add(new JScrollPane(table), BorderLayout.CENTER);
// add other stuff to the panel
this.add(panel, BorderLayout.CENTER);
Run Code Online (Sandbox Code Playgroud)
在我将外观从默认更改为 Nimbus 之前,我能够在 JTable 中左右滚动。(我喜欢 Mac LaF,但 Windows 不支持它,我认为 Windows LaF 很丑), …