How to make right node in borderpane take up whole right sideHow to make a new List in JavaHow to make mock to void methods with MockitoWhat is the secret to set a custom TextArea background?How to make node of borderpane fixed?JavaFX BorderPane will not take on background colourJavaFX BorderPane right side all heightJavaFX Node Alignment in BorderPanesHow to make StackPane with a MediaView fill a BorderPane in JavaFXjavafx borderpane with only 2 nodesJavaFX Hbox of buttons won't fill space of bottom container in BorderPane

How can this tool find out registered domains from an IP?

What is the actual quality of machine translations?

Colloquialism for “see you later”

How to communicate to my GM that not being allowed to use stealth isn't fun for me?

Is an entry level DSLR going to shoot nice portrait pictures?

is it possible for a vehicle to be manufactured witout a catalitic converter

What is the highest possible temporary AC at level 1, without any help from others?

Arriving at the same result with the opposite hypotheses

Soft question: Examples where lack of mathematical rigour cause security breaches?

Do simulator games use a realistic trajectory to get into orbit?

Is White controlling this game?

What can I, as a user, do about offensive reviews in App Store?

Which languages would be most useful in Europe at the end of the 19th century?

Longest bridge/tunnel that can be cycled over/through?

How to tell your grandparent to not come to fetch you with their car?

Giant Steps - Coltrane and Slonimsky

Compiling C files on Ubuntu and using the executable on Windows

Cascading Switches. Will it affect performance?

Extreme flexible working hours: how to control people and activities?

Can Rydberg constant be in joules?

What is the purpose of the goat for Azazel, as opposed to conventional offerings?

Why doesn't Adrian Toomes give up Spider-Man's identity?

Is it legal for a bar bouncer to confiscate a fake ID

Medieval flying castle propulsion



How to make right node in borderpane take up whole right side


How to make a new List in JavaHow to make mock to void methods with MockitoWhat is the secret to set a custom TextArea background?How to make node of borderpane fixed?JavaFX BorderPane will not take on background colourJavaFX BorderPane right side all heightJavaFX Node Alignment in BorderPanesHow to make StackPane with a MediaView fill a BorderPane in JavaFXjavafx borderpane with only 2 nodesJavaFX Hbox of buttons won't fill space of bottom container in BorderPane






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I have an AnchorPane on right side of the BorderPane and another AnchorPane on the bottom. I was wondering the best way, with resizable kept in mind, to make the right AncorPane take up the whole right side and have the bottom AnchorPane end where the right AnchorPane starts.



<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>


<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>
</BorderPane>









share|improve this question
























  • Can you please show your fxml?

    – Samuel Philipp
    Mar 24 at 18:18











  • @SamuelPhilipp Sorry just did, not sure why I didn't think of that lol

    – coolusername
    Mar 24 at 18:22












  • Do you have anything in the CENTER or LEFT of the BorderPane? If not, what do you consider to be the "entire right side" and why are you using a BorderPane at all?

    – Zephyr
    Mar 24 at 19:55


















1















I have an AnchorPane on right side of the BorderPane and another AnchorPane on the bottom. I was wondering the best way, with resizable kept in mind, to make the right AncorPane take up the whole right side and have the bottom AnchorPane end where the right AnchorPane starts.



<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>


<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>
</BorderPane>









share|improve this question
























  • Can you please show your fxml?

    – Samuel Philipp
    Mar 24 at 18:18











  • @SamuelPhilipp Sorry just did, not sure why I didn't think of that lol

    – coolusername
    Mar 24 at 18:22












  • Do you have anything in the CENTER or LEFT of the BorderPane? If not, what do you consider to be the "entire right side" and why are you using a BorderPane at all?

    – Zephyr
    Mar 24 at 19:55














1












1








1








I have an AnchorPane on right side of the BorderPane and another AnchorPane on the bottom. I was wondering the best way, with resizable kept in mind, to make the right AncorPane take up the whole right side and have the bottom AnchorPane end where the right AnchorPane starts.



<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>


<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>
</BorderPane>









share|improve this question
















I have an AnchorPane on right side of the BorderPane and another AnchorPane on the bottom. I was wondering the best way, with resizable kept in mind, to make the right AncorPane take up the whole right side and have the bottom AnchorPane end where the right AnchorPane starts.



<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>


<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>
</BorderPane>






java javafx fxml borderpane






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 24 at 18:36







coolusername

















asked Mar 24 at 18:14









coolusernamecoolusername

83




83












  • Can you please show your fxml?

    – Samuel Philipp
    Mar 24 at 18:18











  • @SamuelPhilipp Sorry just did, not sure why I didn't think of that lol

    – coolusername
    Mar 24 at 18:22












  • Do you have anything in the CENTER or LEFT of the BorderPane? If not, what do you consider to be the "entire right side" and why are you using a BorderPane at all?

    – Zephyr
    Mar 24 at 19:55


















  • Can you please show your fxml?

    – Samuel Philipp
    Mar 24 at 18:18











  • @SamuelPhilipp Sorry just did, not sure why I didn't think of that lol

    – coolusername
    Mar 24 at 18:22












  • Do you have anything in the CENTER or LEFT of the BorderPane? If not, what do you consider to be the "entire right side" and why are you using a BorderPane at all?

    – Zephyr
    Mar 24 at 19:55

















Can you please show your fxml?

– Samuel Philipp
Mar 24 at 18:18





Can you please show your fxml?

– Samuel Philipp
Mar 24 at 18:18













@SamuelPhilipp Sorry just did, not sure why I didn't think of that lol

– coolusername
Mar 24 at 18:22






@SamuelPhilipp Sorry just did, not sure why I didn't think of that lol

– coolusername
Mar 24 at 18:22














Do you have anything in the CENTER or LEFT of the BorderPane? If not, what do you consider to be the "entire right side" and why are you using a BorderPane at all?

– Zephyr
Mar 24 at 19:55






Do you have anything in the CENTER or LEFT of the BorderPane? If not, what do you consider to be the "entire right side" and why are you using a BorderPane at all?

– Zephyr
Mar 24 at 19:55













1 Answer
1






active

oldest

votes


















0














First of all, I'd suggest using a regular Pane instead of an AnchorPane.



Then, you can put this in your code, inside of the start method.



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
);

root.getChildren().add(pane);


This makes a pane that takes up half of the stage, or the window, on the right side.



Then, in your fxml file, in



<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>


remove all the stuff saying the position and the width of the panes.



And then, for the bottom pane, you can add to the widthProperty() and heightProperty() listeners to get this:



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
bottomPane.setPrefWidth(stage.getWidth()-rightPane.getPrefWidth());
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
bottomPane.setPrefHeight(100); // change 100 to how high you want your bottomPane to be
//if you want your bottomPane's height to be half the height of the window use this: bottomPane.setPrefHeight(stage.getHeight()/2);
bottomPane.relocate(0,stage.getHeight() - bottomPane.getPrefHeight());
bottomPane.toFront();
);





share|improve this answer

























  • I don't really use fxml in my applications, so idk if there's an easier way to do this using fxml, but this works for me.

    – Superhuman
    Mar 24 at 20:11











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55326959%2fhow-to-make-right-node-in-borderpane-take-up-whole-right-side%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














First of all, I'd suggest using a regular Pane instead of an AnchorPane.



Then, you can put this in your code, inside of the start method.



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
);

root.getChildren().add(pane);


This makes a pane that takes up half of the stage, or the window, on the right side.



Then, in your fxml file, in



<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>


remove all the stuff saying the position and the width of the panes.



And then, for the bottom pane, you can add to the widthProperty() and heightProperty() listeners to get this:



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
bottomPane.setPrefWidth(stage.getWidth()-rightPane.getPrefWidth());
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
bottomPane.setPrefHeight(100); // change 100 to how high you want your bottomPane to be
//if you want your bottomPane's height to be half the height of the window use this: bottomPane.setPrefHeight(stage.getHeight()/2);
bottomPane.relocate(0,stage.getHeight() - bottomPane.getPrefHeight());
bottomPane.toFront();
);





share|improve this answer

























  • I don't really use fxml in my applications, so idk if there's an easier way to do this using fxml, but this works for me.

    – Superhuman
    Mar 24 at 20:11















0














First of all, I'd suggest using a regular Pane instead of an AnchorPane.



Then, you can put this in your code, inside of the start method.



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
);

root.getChildren().add(pane);


This makes a pane that takes up half of the stage, or the window, on the right side.



Then, in your fxml file, in



<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>


remove all the stuff saying the position and the width of the panes.



And then, for the bottom pane, you can add to the widthProperty() and heightProperty() listeners to get this:



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
bottomPane.setPrefWidth(stage.getWidth()-rightPane.getPrefWidth());
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
bottomPane.setPrefHeight(100); // change 100 to how high you want your bottomPane to be
//if you want your bottomPane's height to be half the height of the window use this: bottomPane.setPrefHeight(stage.getHeight()/2);
bottomPane.relocate(0,stage.getHeight() - bottomPane.getPrefHeight());
bottomPane.toFront();
);





share|improve this answer

























  • I don't really use fxml in my applications, so idk if there's an easier way to do this using fxml, but this works for me.

    – Superhuman
    Mar 24 at 20:11













0












0








0







First of all, I'd suggest using a regular Pane instead of an AnchorPane.



Then, you can put this in your code, inside of the start method.



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
);

root.getChildren().add(pane);


This makes a pane that takes up half of the stage, or the window, on the right side.



Then, in your fxml file, in



<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>


remove all the stuff saying the position and the width of the panes.



And then, for the bottom pane, you can add to the widthProperty() and heightProperty() listeners to get this:



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
bottomPane.setPrefWidth(stage.getWidth()-rightPane.getPrefWidth());
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
bottomPane.setPrefHeight(100); // change 100 to how high you want your bottomPane to be
//if you want your bottomPane's height to be half the height of the window use this: bottomPane.setPrefHeight(stage.getHeight()/2);
bottomPane.relocate(0,stage.getHeight() - bottomPane.getPrefHeight());
bottomPane.toFront();
);





share|improve this answer















First of all, I'd suggest using a regular Pane instead of an AnchorPane.



Then, you can put this in your code, inside of the start method.



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
);

root.getChildren().add(pane);


This makes a pane that takes up half of the stage, or the window, on the right side.



Then, in your fxml file, in



<bottom>
<AnchorPane minWidth="200.0" prefHeight="45.0" prefWidth="600.0" BorderPane.alignment="CENTER" />
</bottom>
<right>
<AnchorPane prefHeight="200.0" prefWidth="200.0" BorderPane.alignment="CENTER" />
</right>


remove all the stuff saying the position and the width of the panes.



And then, for the bottom pane, you can add to the widthProperty() and heightProperty() listeners to get this:



 stage.widthProperty().addListener(event -> 
rightPane.setPrefWidth(stage.getWidth()/2);
rightPane.relocate(stage.getWidth()/2,0);
bottomPane.setPrefWidth(stage.getWidth()-rightPane.getPrefWidth());
);

stage.heightProperty().addListener(event ->
rightPane.setPrefHeight(stage.getHeight());
bottomPane.setPrefHeight(100); // change 100 to how high you want your bottomPane to be
//if you want your bottomPane's height to be half the height of the window use this: bottomPane.setPrefHeight(stage.getHeight()/2);
bottomPane.relocate(0,stage.getHeight() - bottomPane.getPrefHeight());
bottomPane.toFront();
);






share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 24 at 20:07

























answered Mar 24 at 19:39









SuperhumanSuperhuman

598




598












  • I don't really use fxml in my applications, so idk if there's an easier way to do this using fxml, but this works for me.

    – Superhuman
    Mar 24 at 20:11

















  • I don't really use fxml in my applications, so idk if there's an easier way to do this using fxml, but this works for me.

    – Superhuman
    Mar 24 at 20:11
















I don't really use fxml in my applications, so idk if there's an easier way to do this using fxml, but this works for me.

– Superhuman
Mar 24 at 20:11





I don't really use fxml in my applications, so idk if there's an easier way to do this using fxml, but this works for me.

– Superhuman
Mar 24 at 20:11



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid …


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55326959%2fhow-to-make-right-node-in-borderpane-take-up-whole-right-side%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

해남서초등학교 학교 연혁 학교 동문 외부 링크 둘러보기 메뉴북위 34° 34′ 21″ 동경 126° 35′ 50″ / 북위 34.5726385° 동경 126.5972670°  / 34.5726385; 126.5972670해남서초등학교eh