G4P library - Is there a way to add text to a GPanel?

edited April 2017 in Library Questions

Following the example sketch, I made 3 slider bars and added them to a GPanel. However, I want to label these sliders with text (i.e. x,y,z), and I'm having such a hard time adding text to the GPanel. Is this possible?

Answers

  • Add a GLabel with your text instead.

  • Do you mean adding a GLabel (with the text) and then add the GLabel to the GPanel? Is there a method that can do this?

  • Do you mean adding a GLabel (with the text) and then add the GLabel to the GPanel?

    Yes

    Is there a method that can do this?

    The same way that you added the slider to the panel ;)

    label.setText("My text");
    
Sign In or Register to comment.