Hi! lil help? paintcomponent() and text displayed in same window?
I'm not great at programming yet, so i'll cut to the chase
i have a box class that takes in height, length, width and calculates surface area and volume.
I just wanted to show off and draw the cubes and boxes and display their dimensions in a window.
I'm pretty sure you can display text in a JPanel but i really don't know which components to use.
I'd have a JFrame... with a JPanel? split it in two and have one side the text dimensions, on the other side a representation of the cuboid.
Could i pass the measurements taken in as doubles to paintcomponent() and draw the rectangle in proportion to its measurements?
It's a pipe dream seeing as i have like two days to do this but it would be really satisfying.
Any ideas people can give me would be great !
Please ask me to clarify any points to understand my problem, i'd ask my brother he's an IT guy but he's just started a new job for the govt that he has to drive 2 hours to.