Giter Site home page Giter Site logo

Comments (3)

Col-E avatar Col-E commented on August 18, 2024

Reproducible demo:

import lwjgui.scene.Scene;
import lwjgui.scene.Window;
import lwjgui.scene.control.Button;
import lwjgui.scene.control.ScrollPane;
import lwjgui.scene.layout.BorderPane;
import lwjgui.scene.layout.StackPane;
import lwjgui.scene.layout.VBox;

public class Bug extends LWJGUIApplication {
	public static final int WIDTH = 300;
	public static final int HEIGHT = 300;

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

	@Override
	public void start(String[] args, Window window) {
		StackPane root = new StackPane();
		VBox box = new VBox();
		ScrollPane scrollPane = new ScrollPane();
		scrollPane.setPrefHeight(HEIGHT);
		scrollPane.setContent(box);
		root.getChildren().add(scrollPane);
		for (int i = 0; i < 6; i++) {
			BorderPane wrapper = new BorderPane();
			wrapper.setLeft(new Button("Click"));
			wrapper.setPrefHeight(25);
			wrapper.setFillToParentWidth(true);
			box.getChildren().add(wrapper);
		}
		window.setScene(new Scene(root, WIDTH, HEIGHT));
		window.show();
	}
	@Override
	protected void run() {}
}

The "fix" I'm using for now is:

			HBox wrapper = new HBox(); // just don't use BorderPane in scroll-panes
			wrapper.getChildren().add(new Button("Click"));

from lwjgui.

orange451 avatar orange451 commented on August 18, 2024

Hi, thanks for the ticket. Currently, I am not having much free time, and the time I do have I seem to be spending it more on my JadeFX project (successor to LWJGUI). JadeFX currently does have BorderPane implementation, but it is missing many standard control objects.

I can get a fix out for this, but might need some time.

from lwjgui.

Col-E avatar Col-E commented on August 18, 2024

No rush. If JadeFX is the successor I'll happily switch to it once its more complete. For now I have some workarounds.

from lwjgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.