Tag: 无限

怎么做一个无限的jscrollpane?

我之前已经实现了拖动滚动,但是创建无限滚动窗格的最佳方法是什么? 当然不会有任何滚动条,我会实现拖动滚动。 我想要做的是在无限的表面上实现动态加载。 编辑 当然它实际上并不是无限的。 我在问如何假装它。

代码中罕见的无限循环,不想等待它再次发生

好吧,所以我有一个在netbeans中运行的遗传算法,它运行了5个小时,似乎进入了无限循环。 有什么方法可以附加调试器吗? 或者至少得到一些关于它在代码中的位置的线索? 在我等待它再次发生的时候,我宁愿不再坐5个小时。

Java:使用Scanner in.hasNextInt()的无限循环

我使用以下代码: while (invalidInput) { // ask the user to specify a number to update the times by System.out.print(“Specify an integer between 0 and 5: “); if (in.hasNextInt()) { // get the update value updateValue = in.nextInt(); // check to see if it was within range if (updateValue >= 0 && updateValue <= 5) { invalidInput […]