小编adi*_*tsu的帖子

JavaFX Alert会截断邮件吗?

我注意到,如果我尝试Alert用长消息显示,它往往会被截断(在单词边界).

例:

import javafx.application.Application;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.stage.Stage;

public class AlertTest extends Application {
    @Override
    public void start(final Stage primaryStage) throws Exception {
        new Alert(AlertType.INFORMATION, "this is a pretty long message that "
                + "should not be truncated in this alert window, no matter "
                + "how long it is").showAndWait();
    }

    public static void main(final String... args) {
        launch(args);
    }
}
Run Code Online (Sandbox Code Playgroud)

这只显示"这是一个不应该被截断的非常长的消息".
截断的原因是什么,我该如何避免呢?

我在Linux中使用Oracle JDK 1.8.0_60.

java javafx javafx-8

4
推荐指数
1
解决办法
1542
查看次数

如何调整JavaFX图像的大小?

我有一个javafx.scene.image.Image,我想调整它的大小,例如按给定因子缩放它.怎么做(没有转换BufferedImage),有什么选择质量和性能(如插值类型)?

有几个问题看起来很相似,但我找不到任何提出相同问题的人.关键点是输入是一个Image对象(和缩放因子),所需的输出是另一个Image对象.

java javafx

3
推荐指数
1
解决办法
5024
查看次数

AjaxFormComponentUpdatingBehavior not working in Wicket 8

I'm switching from Wicket 6 to Wicket 8, and AjaxFormComponentUpdatingBehavior doesn't seem to work anymore.

Example page:

    public HomePage() {
        final Form<Void> form = new Form<>("form");
        final TextField<String> txt = new TextField<>("txt", new Model<>());
        txt.add(new AjaxFormComponentUpdatingBehavior("onchange") {
            private static final long serialVersionUID = 1L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                System.out.println("update: " + txt.getValue());
            }
        });
        form.add(txt);
        add(form);
    }
Run Code Online (Sandbox Code Playgroud)

and corresponding html:

<form wicket:id="form">
<input wicket:id="txt">
</form>
Run Code Online (Sandbox Code Playgroud)

In Wicket 8.5.0, the onUpdate method never gets called, and there is …

java ajax wicket

2
推荐指数
1
解决办法
97
查看次数

如何在wicket 6中勾选一个复选框?

在早期的wicket版本中,需要复选框确保必须由用户检查,否则验证将失败.在wicket 6中不再是这种情况.现在有没有一种标准的方法来实现相同的行为?

wicket

1
推荐指数
1
解决办法
713
查看次数

标签 统计

java ×3

javafx ×2

wicket ×2

ajax ×1

javafx-8 ×1