#scene builder

1 messages ยท Page 1 of 1 (latest)

median brook
#

is there anything better than scene builder for gui in intelliJ?

dry edgeBOT
#

<@&987246399047479336> please have a look, thanks.

dry edgeBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

glacial crater
dry edgeBOT
#

Closed the thread due to inactivity.

If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you ๐Ÿ‘

median brook
#

hi

#

what yall use to create GUIs?

#

should I be using JavaFX or FXML?

median brook
#

is it possible to create a button that can create a new window?

minor aurora
median brook
minor aurora
median brook
#

I dont know the definition of it

#

but I kind of know what it does

minor aurora
#

what does it do ?

median brook
#

it creates gui

minor aurora
#

it's a file format

median brook
#

it sort of looks like html format

#

using the <>

minor aurora
#

containing data about the structure of part of a gui

#

that can be be read by javafx

median brook
#

how do you use both at once?

minor aurora
#

how can you do fxml without javafx ?

median brook
#

idk

#

thats why Im asking

minor aurora
#

as I said

#

fxml is used by javafx

#

it's part of javafx

median brook
#

but you can create code in the .java file or the .fxml file

minor aurora
#

no

median brook
#

like I can create a buttoin in .fxml and .java

minor aurora
#

you don't put code in fxml

#

you put the structure that a button would have

#

then it will be loaded by javafx into java

median brook
#

can you give me an example?

minor aurora
#

create a scene with fxml

#

then load it with FXMLLoader in java

#

and then you can manipulate it from here

median brook
#

well

#

idk how to do that

#

but I am watching a course on javafx

#

its not easy for a beginner to do that

minor aurora
#

you do it with scenebuilder

median brook
#

how do I add more than one window to an app in java?

#

All I see are swing tutorials when I google

#

actually I think I found it

minor aurora
#

@median brook and what's the problem with scenebuilder ?

median brook
minor aurora
#

i mean, it's easy to use

#

you create a scene

#

and then you drag and drop

median brook
#

I dont know what every pane or controls or cluons is

minor aurora
#

what may be a bit hard to understand is how the controller will work with it tho

minor aurora
#

Anyway, I'll go to sleep
If you have any question, don't hesitate to ask

median brook
#

sleep??

#

good night

median brook
#

which item in scenebuilder do I use to create three circles, making sure one of them is checked? is it the radio button?

median brook
#

how do I create an executable file in java?

minor aurora
median brook
#

you are awake ๐Ÿ™‚

#

hope you had a good sleep

minor aurora
#

I had

median brook
#

Im working on another project

#

Trying to make a client/server chat app

#

this is my GUI so far for the client

minor aurora
#

The text area is a bit too big ๐Ÿค”

median brook
#

is it?

#

how do I create a border around the controls?

#

nevermind I found it

#

how about this

#

on the right of the textarea is a list of names

minor aurora
#

?

median brook
#

its not that big, I think the text area just looks big because of the screenshot

minor aurora
#

It is too big

#

There is no room around it

median brook
#

its 800x700

minor aurora
#

Doesn't matter

#

There is no room around it

median brook
#

why does it need room around it?

minor aurora
#

That's how you make something visually good

median brook
#

oh okay

minor aurora
#

Don't try to optimize the place so there is nothing else

#

It's claustrophobic

#

First let a marging of nothing around the app

#

Second the main text area shouldn't take the whole width

#

But not more than 80%

#

And if possible less than 60%

median brook
#

Im new to this

#

does this look better?

minor aurora
median brook
#

okay

#

like more spacing between the blue lines?

minor aurora
#

You also have space at the bottom, you can shift things a bit toward here

median brook
#

please say you approve

minor aurora
#

It's better yes^^

median brook
#

how do I make the app not resizable?

#

I cant disable it

#

nevermind I did it in the java file

dry edgeBOT
#

Closed the thread due to inactivity.

If your question was not resolved yet, feel free to just post a message to reopen it, or create a new thread. But try to improve the quality of your question to make it easier to help you ๐Ÿ‘

median brook
#

This is off topic but I need to install mysql for my java class

#

I installed mysql but I dont see any runnable program

#

do I need to download the workbench as well?

minor aurora
median brook
#

oaky

median brook
#

what is this error?

shy lily
#

problem in menuaddcontroller

median brook
#

I deleted that controller

shy lily
#

still used somewhere ?

#

if u had an fxml tied to that controller, look in there

median brook
#

I had a button but I deleted it

shy lily
#

( most likely u just deleted the thing instead of doing it the correcter way )

median brook
#

its working now

#

I added an image in scenebuilder but when I start the app it doesnt show

shy lily
#

did u place it in resources or just some random location ?

median brook
#

I didnt add it anywhere

#

I added in the properties for the image view

shy lily
#

then it most likely cannot find it

median brook
#

should I move it here?

shy lily
#

might i suggest looking for a tutorial or video that show's u how to do basic FX projects ? It will help u alot more then just doing 1 thing and the instantly asking here

median brook
#

okay

shy lily
#

we dont mind the questions, just not on every action ๐Ÿ˜‰

median brook
#

yeah

#

its not easy for me

shy lily
#

its easy, u just skipped to far ahead to learn things

median brook
#

well my professor doesnt really teach

#

he has no output about scene builder

#

he wants us to do everything in fxml or javafx

#

not including scene builder

shy lily
#

He's only doing his job with most likely a preset course that he has to follow. That doesn't stop u from using the internet ๐Ÿ™‚

#

and u can't really teach coding to someone, u can explain and guide some, but the area is waaay to big to even cover the basics on how to do things

median brook
#

the only thing he told us about gui is how to create a button and a label

#

I could have learned that just by running the javafx default

shy lily
#

can still get alot worse

median brook
#

i doubt that

#

i mean hes a good guy

shy lily
#

when i had my courses, i got handed a half A4 page with the assignment and the teacher never showed after due to illness. Project still due at x date, if not there, year had to be redone

median brook
#

yeah mine isnt that bad

shy lily
#

little elbow grease and google / duckduckgo finds alot of info on how to do things with scenebuilder and Fx

median brook
#

my group partner is doing the whole scene without fxml

#

is that wrong?

shy lily
#

basic gui, not at all

#

builder is easier and faster

#

wysiwyg vs restarting to see what u get

#

( What you see is what you get )

median brook
#

yeah I am trying to redo everything

median brook
#

Does google have all the answers?

regal grove
median brook
#

I need help

#

let me search google

#

I want to make the table editable

#

when someone clicks or double clicks on the table, a textbox appears

#

my friend did it but I cant seem to replicate it

minor aurora
median brook
minor aurora
#

you say you wanted to make a textbox appear @median brook

median brook
#

inside the table

minor aurora
#

not that it should be here by default

#

ah

median brook
#

a textbox insides the table

minor aurora
# median brook

and you should be able to do that directly from scenebuilder

median brook
#

so they can edit it

#

what is a header graphic?

minor aurora
#

but as i said, you should be able to do that from scenebuilder directly

median brook
#

directly as in changing a property?

minor aurora
median brook
#

let me go see how vbox works

#

ok what I am trying to do is make every table cell editable

#

this is his program

median brook
#

anyone can help with this?

median brook
#

I keep getting this error

#

is it my controller again?

#

nevermind I figured it out

#

    @FXML
    private TableView<Food> tableView;

    @FXML
    private TableColumn<Food, String> tableDescription;

    @FXML
    private TableColumn<Food, String> tableEntree;

    @FXML
    private TableColumn<Food, String> tablePrice;

    @FXML
    private TableView<Food> tableDrink;

    @FXML
    private TableColumn<Food, String> tableDrinkDescription;

    @FXML
    private TableColumn<Food, String> tableDrinkItem;

    @FXML
    private TableColumn<Food, String> tableDrinkPrice;

    ObservableList<Food> list = FXCollections.observableArrayList(
            new Food("Filet Mignon", "10oz USDA Prime seasoned in Rokka's citrus rub.", "$68"),
            new Food("Aaron's O' Ribs", "Braised pork ribs smothered in our house tamarind raspberry BBQ sauce.", "$35"),
            new Food("Chicken Tomahawk", "Chicken thighs seasoned in Rokka's citrus herb rub. ", "$23"),
            new Food("Halibut", "Pan-seared in our mouth watering lemon capped Beurre Blanc.", "$45"),
            new Food("", "", ""),
            new Food("", "", ""),
            new Food("", "", ""),
            new Food("", "", ""),
            new Food("", "", "")
    );

    ObservableList<Food> drinkList = FXCollections.observableArrayList(
            new Drink("test", "1,","23")
    );

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        tableEntree.setCellValueFactory(new PropertyValueFactory<Food, String>("tableDrinkItem"));
        tableDescription.setCellValueFactory(new PropertyValueFactory<Food, String>("tableDrinkDescription"));
        tablePrice.setCellValueFactory(new PropertyValueFactory<Food, String>("tableDrinkPrice"));

        tableEntree.setCellValueFactory(new PropertyValueFactory<Food, String>("tableEntree"));
        tableDescription.setCellValueFactory(new PropertyValueFactory<Food, String>("tableDescription"));
        tablePrice.setCellValueFactory(new PropertyValueFactory<Food, String>("tablePrice"));

        tableView.setItems(list);
        tableDrink.setItems(drinkList);
    }
}```
dry edgeBOT
# median brook ```public class HelloController implements Initializable { @FXML privat...

Detected code, here are some useful tools:

Formatted code
public class HelloController implements Initializable {
  @FXML
  private TableView<Food> tableView;
  @FXML
  private TableColumn<Food, String> tableDescription;
  @FXML
  private TableColumn<Food, String> tableEntree;
  @FXML
  private TableColumn<Food, String> tablePrice;
  @FXML
  private TableView<Food> tableDrink;
  @FXML
  private TableColumn<Food, String> tableDrinkDescription;
  @FXML
  private TableColumn<Food, String> tableDrinkItem;
  @FXML
  private TableColumn<Food, String> tableDrinkPrice;
  ObservableList<Food> list = FXCollections.observableArrayList(new Food("Filet Mignon", "10oz USDA Prime seasoned in Rokka's citrus rub.", "$68"), new Food("Aaron's O' Ribs", "Braised pork ribs smothered in our house tamarind raspberry BBQ sauce.", "$35"), new Food("Chicken Tomahawk", "Chicken thighs seasoned in Rokka's citrus herb rub. ", "$23"), new Food("Halibut", "Pan-seared in our mouth watering lemon capped Beurre Blanc.", "$45"), new Food("", "", ""), new Food("", "", ""), new Food("", "", ""), new Food("", "", ""), new Food("", "", ""));
  ObservableList<Food> drinkList = FXCollections.observableArrayList(new Drink("test", "1,", "23"));
  @Override
  public void initialize(URL url, ResourceBundle resourceBundle) {
    tableEntree.setCellValueFactory(new PropertyValueFactory<Food, String>("tableDrinkItem"));
    tableDescription.setCellValueFactory(new PropertyValueFactory<Food, String>("tableDrinkDescription"));
    tablePrice.setCellValueFactory(new PropertyValueFactory<Food, String>("tableDrinkPrice"));
    tableEntree.setCellValueFactory(new PropertyValueFactory<Food, String>("tableEntree"));
    tableDescription.setCellValueFactory(new PropertyValueFactory<Food, String>("tableDescription"));
    tablePrice.setCellValueFactory(new PropertyValueFactory<Food, String>("tablePrice"));
    tableView.setItems(list);
    tableDrink.setItems(drinkList);
  }
}
median brook
#

I made a class Drink that inherits from Food

#

I created table with 3 columns

#
    private TableView<Food> tableDrink;

    @FXML
    private TableColumn<Food, String> tableDrinkDescription;

    @FXML
    private TableColumn<Food, String> tableDrinkItem;

    @FXML
    private TableColumn<Food, String> tableDrinkPrice;```
dry edgeBOT
median brook
#

For this part do I put Food or Drink as the key?

median brook
#

yo guys I got the editable table working

median brook
#

check this out

median brook
#

do you need scene builder to open a java project that used scene builder?

#

like if I sent this to my friend and he doesnt have scene builder, will it work?

glacial pelican
#

Scenebuilder is just to make the fxml file

#

It will work if you send it to anyone

median brook
#

thanks

#

that was what I was thinking