java - How to resize image to maximize their dimensions into a panel without changing aspect ratio -
i want draw images panel, need images conserves aspect ratio biggest dimensions drawn on panel. given panel dimensions must create java code maximize dimensions. ideas had needed solve linear programming, , don´t know how in java. wich should easiest way need? you can use darryl's stretch icon . dynamically resize icon fill space available label.