java - Automatically scaling font to fit panel -


i have swing app main panel divided 3x2 grid of charts, , app can resized, charts (jfreechart) auto scaling. 1 of these panels display apdex rating in, text (e.g. '0.89 [0.5]*'). use application display on monitor visible everyone, , scale multiple instances of app monitor different data centers. scaling apdex font size fit available panel space i'm after.

any ideas?

after re-reading , rethinking question suggest try calculating use of fontmatrics stringwidth string , iteratively increasing font size until can, i.e. size evaluated versus available space.

a ready algorithm nice didn't hear of any.

good luck, boro.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -