Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: i need help 😭

  1. #1
    Junior Member
    Join Date
    Sep 2024
    Location
    Canada
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default i need help 😭

    i want to make the text overflow, but idk how to do it

    // create a new frame to store text field and button
    JFrame f = new JFrame("debug menu");

    // create a label to display text
    JLabel l = new JLabel("FPS: "+ FPS);
    JLabel l = new JLabel("Key: "+ hasKey);
    // create a panel
    JPanel p = new JPanel();

    // add label to panel
    p.add(l);

    // add panel to frame
    f.add(p);

    // set the size of frame
    f.setSize(500, 500);

    f.show();

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,107
    Thanks
    65
    Thanked 2,717 Times in 2,667 Posts

    Default Re: i need help 😭

    Can you explain your problem some more? What do you mean by "overflow"? Where do you want that to happen? What happens when you compile and execute the posted code?

    Please edit your post and wrap your code with code tags:

    [code]
    **YOUR CODE GOES HERE**
    [/code]

    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.