Java JFrame proportional Resizing | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Java JFrame proportional Resizing

Hey guys :) I've got the Problem that my way of proportional resizing of my JFrame doesn't work so well. In my Application I'm using the componentResized(CompontentEvent e) method of the CompontentListener of my JFrame. I this method i set the width of the frame in dependence of its height. But when i run the code the width of the frame just adjusts after releasing the window. I hope you can solve my problem :) *P.S: Sorry for my bad englisch; i'm from Germany

10th Dec 2016, 5:32 PM
RNHolzinger01
RNHolzinger01 - avatar
1 Answer
0
Das Problem ist, dass die Methode componentResized(CompontentEvent e) erst ausgeführt wird, nachdem du die Maus loslässt. soweit mir das bekannt ist. wie man dieses Problem löst weiß ich nur leider auch nicht.
11th Dec 2016, 4:29 PM
Peter