Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click the taskbar icon and the window cannot be minimized. #16

Open
hakpaang opened this issue Oct 14, 2021 · 9 comments
Open

Click the taskbar icon and the window cannot be minimized. #16

hakpaang opened this issue Oct 14, 2021 · 9 comments

Comments

@hakpaang
Copy link

OS:win10
jdk-version:8
when StageStyle is DECORATED, the window can be minimized.

@Oshan96
Copy link
Owner

Oshan96 commented Oct 15, 2021

Can you provide reproducible code of the issue here so that I can look into that?

@hakpaang
Copy link
Author

The examples provided by customstage can reproduce this situation.

package v1_0_0;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import lk.vivoxalabs.customstage.CustomStage;
import lk.vivoxalabs.customstage.CustomStageBuilder;

/**
 * Created by oshan on 08-Mar-18.
 *
 * @author oshan
 */
public class StageTest extends Application{

    public static void main(String args[]){
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {

        //Whole usage of CustomStage

        CustomStage stage = new CustomStageBuilder()
                .setWindowTitle("CustomStage example")
                .setWindowColor("rgb(34,54,122)") 
                .build();

        stage.show();

        //Change the scene of the window
        //stage.changeScene(FXMLLoader.load(getClass().getResource("Dashboard.fxml")));
    }
}

@Oshan96
Copy link
Owner

Oshan96 commented Oct 17, 2021

I tested this again with JDK8 on windows 10 and I am unable to reproduce this error. Works fine

@Oshan96
Copy link
Owner

Oshan96 commented Oct 17, 2021

In case, you're using CustomStage-1.3.2 right?

@hakpaang
Copy link
Author

java version "1.8.0_202"
CustomStage version "1.3.2"

@hakpaang
Copy link
Author

I think it might be a bug in JDK.
All stage styles except StageStyle.DECORATED have this error.

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

public class StageTest extends Application {
  public static void main(String args[]){
    launch(args);
  }

  @Override
  public void start(Stage primaryStage) {
    primaryStage.initStyle(StageStyle.UNDECORATED);  // StageStyle.DECORATED
    Label l = new Label("Hello");
    Scene scene = new Scene(new StackPane(l), 640, 480);
    primaryStage.setScene(scene);
    primaryStage.show();
  }
}

@Oshan96
Copy link
Owner

Oshan96 commented Oct 17, 2021

Oh wait. In here, you're not using CustomStage at all! You're just using the original "primaryStage" object. This is not a CustomStage object. Please refer to CustomStage basic usage section in wiki. Read through the wiki and you will understand how to use CustomStage!

Hope this helps. Since this is not a bug, I'm going to close the issue.

@Oshan96 Oshan96 closed this as completed Oct 17, 2021
@hakpaang
Copy link
Author

I did use CustomStage ,like this

@Override
  public void start(Stage primaryStage) throws IOException {
    CustomStage stage = new CustomStageBuilder()
        .setWindowTitle("CustomStage example")
        .build();
    stage.show();
  }

I mean, the same problem happens with the original undecorated stage.

@Oshan96 Oshan96 reopened this Oct 17, 2021
@Oshan96
Copy link
Owner

Oshan96 commented Oct 17, 2021

I couldn't reproduce the bug, but I will look further into this. Also reopening this issue since you've used CustomStage object properly in your code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants