Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8902029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:30:37+00:00 2026-06-15T01:30:37+00:00

I’m new to Java and JavaFX I have php,javascript,HTML experience… I’m trying to create

  • 0

I’m new to Java and JavaFX I have php,javascript,HTML experience… I’m trying to create a GUI for doing math and showing the results using javaFX text objects. I have a constructor method to create each text object based on its input. Then I have another constructor method which would call the previous one several times creating multiple text objects, but I can’t get this to work because it won’t let me define the new text objects based on the methods input ex:

public function(variable)
{
    Text variable = new Text();
}

The problem is that each time the program is run there would be a different amount of text objects on screen, so I’m not sure how to accomplish the naming convention when I won’t know the total # of objects beforehand.

Also how would I add them all to the scene at the end. Would the constructor method add each to a group as they are created and then the whole group would get added with the get children method?

A more general idea of what I want to create:
The program would start with 10 text items on the screen. The user could click on two objects and choose to add/subtract/multiply them together, and then another text label would be created with the answer after processing the event. The new one could then be used to create another answer, and another and so on…

Maybe I’m approaching this totally wrong, let me know how you would approach it.

-back to my initial question, I could name the starting 10 statically if I wanted, but I’ll need to know how to do it dynamically to add more I think… …or maybe I’m waaay off…

Thanks in advance,
Brad

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:30:39+00:00Added an answer on June 15, 2026 at 1:30 am

    You want to use some sort of simple collection, like an Array or List. You may want to read through the Collections tutorials for Java. For your program, the simplest approach would probably be an array of Text objects:

    Text[] textObjects = new Text[10];//Replace 10 with however many you will need
    for(int i = 0; i < 10; i++) {
      textObjects[i] = new Text();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have thousands of HTML files to process using Groovy/Java and I need to
I'm trying to create an if statement in PHP that prevents a single post
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.