开发者

How to make a jWindow appear below a textfield when my textfield is in another class?

开发者 https://www.devze.com 2023-04-02 04:39 出处:网络
I want to make an autocomplete program (just like when you search in the Google). When you start to type in the textfield, a list of suggestions appear below. Its hard for me to download swingX in the

I want to make an autocomplete program (just like when you search in the Google). When you start to type in the textfield, a list of suggestions appear below. Its hard for me to download swingX in the net thats why I come up for this option to use a JWindow.

Is it possible to have this op开发者_如何学JAVAtion?

Thanks...


You can use tf.getLocationOnScreen() to identify the location of your text field in absolute screen coordinates. Then calculate the location where to put your JWindow.

0

精彩评论

暂无评论...
验证码 换一张
取 消