这是怎么回事?
好吧,我试图让我的Pane在视觉上更好一点,所以,我正在做的是:设置我的舞台UNDECORATED(OK)和(TRYING)添加一个drophadow效果(不行).
我通过互联网搜索了这样的问题(很多),发现了一些类似的情况(在javafx 2.0中创建未修饰的阶段以及如何在JavaFX中添加阴影到窗口?)但是对我来说都不适用.
它似乎没有设置投影!无法理解为什么.
看看我得到了什么:
public static int showConfirmDialog(Window father, String title, String body, String[] msgBtn)
{
System.out.println("La vai eu");
AnchorPane ap = createPaneWithButton(2, msgBtn,body);
ap.setEffect(initDropShadow());
Scene scene = new Scene(ap);
Stage stage = new Stage();
stage.setTitle(title);
scene.setFill(null);
stage.initStyle(StageStyle.TRANSPARENT);
stage.setScene(scene);
stage.initStyle(StageStyle.UNDECORATED);
stage.show();
return 1;
}
Run Code Online (Sandbox Code Playgroud)
private static AnchorPane createPaneWithButton(int qtBtn, String[] msgsBtn, String body) {
AnchorPane ap = createPane();
HBox laneBtn = new HBox(30);
VBox vbox = new VBox(20);
BorderPane layout = new BorderPane();
Button …Run Code Online (Sandbox Code Playgroud) 我从文本文件中提取数字并用它们填充int类型的数组.
我正在将值插入到数组中,同时使用这些代码行循环遍历.txt文件(其中k是.txt文件中的数字量):
for (int j = 0; j < k; j++)
inputFile >> tab[j];
Run Code Online (Sandbox Code Playgroud)
当文本文件中的数字小于2,147,483,647时,这是整数类型的最大大小,一切顺利.
当数字大于这个程序时,我假设溢出并且无法插入它,但它之后也无法插入任何数字.
导致溢出发生后不再插入数字的原因是什么?