Seruhio Mendoza

Greenhorn
+ Follow
since Jun 10, 2018
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Seruhio Mendoza

5 years ago
https://hastebin.com/imacikepix.java

Yes, I tried to get the size of the JTextField and assign it to the jdialog just before the d.setVisible(true); in this way d.setPreferredSize(this.getSize());

In fact if I look at the size of the jdialog (d.getSize()) the size has changed but nothing happens visually.

The jdialog size only changes when I call setPreferredSize when I start the program.

I need it to change and it's always the same size as the jtextfield.



Thanks for your response, I have already done what you asked for.
5 years ago
0
down vote
favorite
I'm using a "JSuggestField" which is a modification of JTextField that's capable of showing suggestions, the thing is it uses a JDialog to show those suggestions and I need it to be shown always as wide as the jTextField (so if jTextField becomes wider then JDialog should change with it)

Here's my code, see if you can lend me a hand

https://pastebin.com/wAWfTVDG
5 years ago