#scene builder
1 messages ยท Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
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.
Whats wrong with scene builder?
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 ๐
is it possible to create a button that can create a new window?
both
why both?
do you know what fxml is ?
what does it do ?
it creates gui
it's a file format
how do you use both at once?
xml
how can you do fxml without javafx ?
but you can create code in the .java file or the .fxml file
no
like I can create a buttoin in .fxml and .java
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
can you give me an example?
create a scene with fxml
then load it with FXMLLoader in java
and then you can manipulate it from here
well
idk how to do that
but I am watching a course on javafx
its not easy for a beginner to do that
you do it with scenebuilder
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
create a Stage, set the scene, display it
@median brook and what's the problem with scenebuilder ?
theres not much tutorials on it
I don't think you need any tutorial ๐ค
i mean, it's easy to use
you create a scene
and then you drag and drop
I dont know what every pane or controls or cluons is
what may be a bit hard to understand is how the controller will work with it tho
you have the javadoc and tutorials for that
Anyway, I'll go to sleep
If you have any question, don't hesitate to ask
which item in scenebuilder do I use to create three circles, making sure one of them is checked? is it the radio button?
how do I create an executable file in java?
Yes
It's kinda complicated: you first need to create a jar of your program, then you need to use jpackage to create a jre and package it in an installer
Maven has plug-in for all of that btw
I had
Im working on another project
Trying to make a client/server chat app
this is my GUI so far for the client
The text area is a bit too big ๐ค
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
?
its not that big, I think the text area just looks big because of the screenshot
its 800x700
why does it need room around it?
That's how you make something visually good
oh okay
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%
Add a bit more room between each component and the borders
Yes
And the borders of the app too
You also have space at the bottom, you can shift things a bit toward here
It's better yes^^
how do I make the app not resizable?
I cant disable it
nevermind I did it in the java file
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 ๐
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?
you should create a new post if it is a totally different question
oaky
problem in menuaddcontroller
I deleted that controller
I had a button but I deleted it
( most likely u just deleted the thing instead of doing it the correcter way )
its working now
I added an image in scenebuilder but when I start the app it doesnt show
did u place it in resources or just some random location ?
then it most likely cannot find it
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
okay
we dont mind the questions, just not on every action ๐
its easy, u just skipped to far ahead to learn things
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
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
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
can still get alot worse
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
yeah mine isnt that bad
little elbow grease and google / duckduckgo finds alot of info on how to do things with scenebuilder and Fx
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 )
yeah I am trying to redo everything
Does google have all the answers?
Yes if you search correctly
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
listen on click, thanks to scenebuilder
you say you wanted to make a textbox appear @median brook
inside the table
a textbox insides the table
and you should be able to do that directly from scenebuilder
they simply set a vbox in the column of the table
but as i said, you should be able to do that from scenebuilder directly
directly as in changing a property?
no, you can drag a drop a vbox or textfield on the table
let me go see how vbox works
ok what I am trying to do is make every table cell editable
this is his program
anyone can help with this?
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);
}
}```
Detected code, here are some useful tools:
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);
}
}
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;```
Detected code, here are some useful tools:
For this part do I put Food or Drink as the key?
yo guys I got the editable table working
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?