Sizing of GUI

Asked

Viewed 75 times

1

all good? I’m making my first program in Java. How do I make it visually compatible with any monitor and resolution? I already tried it once and this first time I tried it, I made the components and windows measuring on my monitor, but it was horrible when I tried to open it in college (larger monitor). Then I threw it all away (if I remember correctly) and decided to start from the beginning. I used Java Swing in Netbeans, but I also discontinued it because of difficulties with customizing the elements, which I wanted, but didn’t know how to do. I’m using Eclipse and decided to redo it in Netbeans, doing two programs simultaneously, to see the differences between one IDE and the other (but that’s not important, I think). From now on, thank you!

  • Your question is too wide. Add what you’ve already tried to make it easier to answer. And be more specific with "Gui", there are several ways to do this in java, also tell what kind of GUI(javafx, swing/awt) is doing.

  • The trick is to draw relative graphic interfaces (rather than absolutes). All components must have a margin relative to their parent/sibling. Since you didn’t mention the graphic bibliography you’re using, I would advise Java fx. You can find here some examples

  • Look, I thought it was advice from Stack Overflow himself regarding what I wrote. = P I don’t know what Java fx is, I’m searching. But I remember using Swing and not AWT.

  • Anyway, the question is wide open. it is recommended you first learn about layout managers, they will give you the basis to build relative windows.

  • Use javafx, it is very good to make UI resizable , it is full of 'Binding' IE, things stretch, and still has a great algorithm of choice automatic size in 'Nodes'

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.