How to get a picture out of the program (visual)

HII! Someone please can help me how can i get the logo.png half out of the program and the another half in the program (the second picture is how i want it) (and the first picture is mine) Here is the code
51 Replies
JavaBot
JavaBot•3d ago
āŒ› This post has been reserved for your question.
Hey @Crapper! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st•3d ago
Isn't that just another picture for the login thing?
Crapper
CrapperOP•3d ago
what do you mean? yeah its a login thing but i want the logo half in the program and half not the program
dan1st
dan1st•3d ago
In the second picture, there are just two different images
Crapper
CrapperOP•3d ago
yeah its a different one just to show what i want with mine
dan1st
dan1st•3d ago
oh you want to zoom in?
Crapper
CrapperOP•3d ago
the first is mine
dan1st
dan1st•3d ago
I don't see the difference you are talking about
Crapper
CrapperOP•3d ago
you see my logo? the first picture at the middle top? and you see in the other picture? mine is cut in half
dan1st
dan1st•3d ago
oh you want to move it down
Crapper
CrapperOP•3d ago
like the other part in mine just wanished no i dont want to move it and still wanna see the other part like in the second picture
dan1st
dan1st•3d ago
Change the logo.setTranslateY(-220);? to use another value maybe -440 idk
Crapper
CrapperOP•3d ago
you see the fyremc logo in the second picture? the middle top its half in the panel and half not in the panel and you see mine? its half in the panel and the other hald is not seeable it cut in half why mine is not seeable?
dan1st
dan1st•3d ago
that's why I suggested moving it down
Crapper
CrapperOP•3d ago
if i move it down it all will be in the panel
dan1st
dan1st•3d ago
because it's so far up it's outside of the window?
Crapper
CrapperOP•3d ago
yeah i want the other half in the window and the other half not in the window like in the second picture just visualy you understand now?
dan1st
dan1st•3d ago
Isn't it all in the window in the second one?
Crapper
CrapperOP•3d ago
no
Crapper
CrapperOP•3d ago
No description
Crapper
CrapperOP•3d ago
half is not in the window you see?
dan1st
dan1st•3d ago
I think that's a thing where you make the window bigger but parts of the window are transparent
Crapper
CrapperOP•3d ago
you saw my code? you can help me with that?
dan1st
dan1st•3d ago
I think you can do it with that: https://stackoverflow.com/q/991074/10871900
Crapper
CrapperOP•3d ago
im a bit new i dont realy understand this
dan1st
dan1st•3d ago
you cannot draw outside of the window but you can make a bigger window and make it transparent
Crapper
CrapperOP•3d ago
yeah i want that you can take a look at my code? i tired to make it the Logopane but its not bigger then the other idk why like it should be bigger: logoPane.setPrefSize(root.getWidth(), root.getHeight() + 400); you can help me with that please?
dan1st
dan1st•3d ago
Oh you are using swing
Mani
Mani•3d ago
Man why does frontend always look so difficult šŸ„€
dan1st
dan1st•3d ago
https://forums.oracle.com/ords/apexds/post/what-about-non-rectangle-stage-1655 try that stage.initStyle(StageStyle.TRANSPARENT); and make it a bit bigger than the parts you need for the main content but you cannot draw outside of the window
Crapper
CrapperOP•3d ago
where should i do that?
Crapper
CrapperOP•3d ago
i already have this but its not working:
Pane logoPane = new Pane();
logoPane.setPrefSize(root.getWidth(), root.getHeight() + 400);
logoPane.setPickOnBounds(false);

logoPane.getChildren().add(iv);

iv.layoutXProperty().bind(logoPane.widthProperty()
.subtract(iv.fitWidthProperty()).divide(2));

iv.setTranslateY(-195);

logoPane.setViewOrder(-1);

return logoPane;
Pane logoPane = new Pane();
logoPane.setPrefSize(root.getWidth(), root.getHeight() + 400);
logoPane.setPickOnBounds(false);

logoPane.getChildren().add(iv);

iv.layoutXProperty().bind(logoPane.widthProperty()
.subtract(iv.fitWidthProperty()).divide(2));

iv.setTranslateY(-195);

logoPane.setViewOrder(-1);

return logoPane;
its in the Makelogo
dan1st
dan1st•3d ago
in the start method before show() and I think for the Scene scene = new Scene(root, 820, 520);, you need to increase the height probably
Crapper
CrapperOP•3d ago
i made something like this but it changes nothing
Crapper
CrapperOP•3d ago
StackPane root2 = new StackPane();
Scene scene2 = new Scene(root2, 820, 620);
scene2.setFill(Color.TRANSPARENT);

Region logo = makeLogo(root2);
root2.getChildren().add(logo);
root2.setAlignment(logo, Pos.TOP_CENTER);
logo.setTranslateY(-250);
logo.setViewOrder(-1);
addFloaty(logo);
StackPane root2 = new StackPane();
Scene scene2 = new Scene(root2, 820, 620);
scene2.setFill(Color.TRANSPARENT);

Region logo = makeLogo(root2);
root2.getChildren().add(logo);
root2.setAlignment(logo, Pos.TOP_CENTER);
logo.setTranslateY(-250);
logo.setViewOrder(-1);
addFloaty(logo);
this is the new part its another StackPane bigger then the other its 620 not 520 and im adding the logo to it
dan1st
dan1st•3d ago
What if you don't make the StackPane bigger?
Crapper
CrapperOP•3d ago
still nothing
dan1st
dan1st•3d ago
what happens exactly?
Crapper
CrapperOP•3d ago
No description
dan1st
dan1st•3d ago
Can you make it that windowContent is smaller than root? and then you put something in the part of root that is not in windowContent?
Crapper
CrapperOP•3d ago
i added red color to it and nothing: StackPane root2 = new StackPane(); Scene scene2 = new Scene(root2, 820, 720); scene2.setFill(Color.RED); Region logo = makeLogo(root2); root2.getChildren().add(logo); root2.setAlignment(logo, Pos.TOP_CENTER); logo.setTranslateY(-195); logo.setViewOrder(-1); addFloaty(logo);
dan1st
dan1st•3d ago
What does addFloaty even do?
Crapper
CrapperOP•3d ago
here is the full if you wanna see
Crapper
CrapperOP•3d ago
Crapper
CrapperOP•3d ago
its just an animacion it means nothing for this
Hosti
Hosti•3d ago
private void addFloaty(Region node) {
TranslateTransition tt = new TranslateTransition(Duration.seconds(2.6), node);
tt.setFromY(0);
tt.setToY(-6);
tt.setAutoReverse(true);
tt.setCycleCount(Animation.INDEFINITE);
tt.play();
}
private void addFloaty(Region node) {
TranslateTransition tt = new TranslateTransition(Duration.seconds(2.6), node);
tt.setFromY(0);
tt.setToY(-6);
tt.setAutoReverse(true);
tt.setCycleCount(Animation.INDEFINITE);
tt.play();
}
This message has been formatted automatically. You can disable this using /preferences.
dan1st
dan1st•3d ago
For testing, I suggest to - add a border around root - make sure that both the Stage and root are transparent - make sure that windowContent is smaller (in terms of height) that root - the border should then be bigger than your main content once you get that, you can then work on actually getting the text to display properly I think
Crapper
CrapperOP•3d ago
can you help why isnt this seeable? here is the code
dan1st
dan1st•3d ago
idk and tbh I'm not willing to set up a JavaFX project to test it because I need sleep lol
Crapper
CrapperOP•3d ago
ok thanks bye
JavaBot
JavaBot•3d ago
Post Closed
This post has been closed by <@1018474190690603108>.

Did you find this page helpful?