Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

374
Is there a better way to do this for my AI image generator lol
Image
Comments

The options are coming from combo boxes (JavaFX) where the user can select various styles. Each style needs to be more detailed in order for the image to come out well so that's where this horrendous switch statement came in lmao

[not loaded or deleted]

I will try that thanks so much!!! I haven't coded with Java in years and I'm a college student so I really appreciate the advice.

[not loaded or deleted]

True I think I'll try putting them in a map or dictionary, thank you! I appreciate it

[not loaded or deleted]

Data Structures was not my favorite class haha. But you're right, I do need to go over them again. Also haven't coded in Java in like 4 years lol.

[not loaded or deleted]

Have YOU ever heard of someone being new to something? Or being rusty on something? Get off your smartass high horse thinking you're the zenith of intelligence. Dick.

[not loaded or deleted]

If you read my comment maybe you would know lol

[not loaded or deleted]

I appreciate it, thank you.

[not loaded or deleted]

The switch case is around 200 lines lollll, what my program does is the user can select various styles from a variety of combo boxes (ex: one for period of time, one for art style, one for theme, etc.). Once they select their options from the combo boxes, I use method getPrompt() (this is the one with the giant switch in it) to get the actual style. The styles are then concatenated and are eventually passed into the imageToImageGeneration() method which handles the API call. So each case in the switch is a different option in one of the combo boxes, wasn't sure the best way to handle that haha.

Author
Account Strength
100%
Account Age
1 year
Verified Email
Yes
Verified Flair
Yes
Total Karma
1,105
Link Karma
962
Comment Karma
143
Profile updated: 1 day ago
Posts updated: 1 day ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
1 year ago