This post has been de-listed (Author was flagged for spam)
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I'm making a minesweeper application, and I'm having trouble making my canvas (for the grid) stay centered in the window. I've made my canvas automatically resizable, so it takes up any available space if the window is resized while maintaining its aspect ratio (it can be either square or rectangular). I tried nesting a VBox inside an HBox but that didn't work. Any ideas? Seems like it should be a simple thing to implement...
Another idea I had was just keep a reference to the parent node's dimensions inside the canvas and change the draw logic based on that, but that seems too hacky.
Subreddit
Post Details
- Posted
- 11 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/JavaFX/comm...