开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜