java - J frame resizing in an aspect ratio -


I have created a game using jFrame with component, is there any way that I can make the JFram bigger, But using a square aspect so that the length of the stretch is always equal to the width?

Any help is appreciated.

Cheers

You can implement component listener and something like

  @ Override public zero component was resized (component identifier RGR) {rectangle B = RGEL.GetCompNant (). GetBounds (); Arg0.getComponent (). Setbound (bx, bi, b.width, b.width); }   

and use it for your JFrame. The only thing is with JFrame, it does not increase this phenomenon until the mouse is released. If you want to see the change by dragging the mouse, you have to use JeffNeal and for this, instead of the JFRM, you must use this component listener and fill the frame with the panel.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -