Add "Download Java" button to dialog & other small changes#35
Add "Download Java" button to dialog & other small changes#35trustytrojan wants to merge 3 commits intoCleanroomMC:masterfrom
Conversation
…jdk 25 download page
… specify that we want a 21+ jvm in the label
There was a problem hiding this comment.
Pull request overview
This PR enhances the Cleanroom Relauncher GUI with user experience improvements including a "Download Java" button, dark mode support, and improved default selections. The button provides direct access to Java downloads via the system browser or displays the download link in a fallback dialog. Dark mode is implemented as a configurable option that defaults to enabled.
- Added "Download Java" button that opens the Adoptium Temurin download page or shows a dialog with the link
- Implemented dark mode functionality with configuration persistence
- Changed default selection to pre-select the latest Cleanroom release instead of using an uninitialized value
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/main/java/com/cleanroommc/relauncher/gui/SupportingFrame.java | Fixed initial visibility to false (prevents supporting frame from appearing) |
| src/main/java/com/cleanroommc/relauncher/gui/RelauncherGUI.java | Added Download Java button with browser integration, dark mode UI implementation, updated label to specify Java 21+, and fixed release pre-selection |
| src/main/java/com/cleanroommc/relauncher/config/RelauncherConfiguration.java | Added darkMode configuration field with getter/setter methods |
| .vscode/settings.json | Added VS Code Java null analysis setting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "Please download Java 21 or later from:\n" + downloadUrl, | ||
| "Download Java", | ||
| JOptionPane.INFORMATION_MESSAGE); | ||
| } | ||
| } catch (Exception ex) { | ||
| CleanroomRelauncher.LOGGER.error("Failed to open browser", ex); | ||
| JOptionPane.showMessageDialog(this, | ||
| "Please download Java 21 or later from:\n" + downloadUrl, |
There was a problem hiding this comment.
The download URL points to Java 25 (version=25), but the error messages say "Java 21 or later". This creates an inconsistency. Either update the URL to point to Java 21 downloads, or update the error messages to say "Java 25 or later" to match the URL.
| "Please download Java 21 or later from:\n" + downloadUrl, | |
| "Download Java", | |
| JOptionPane.INFORMATION_MESSAGE); | |
| } | |
| } catch (Exception ex) { | |
| CleanroomRelauncher.LOGGER.error("Failed to open browser", ex); | |
| JOptionPane.showMessageDialog(this, | |
| "Please download Java 21 or later from:\n" + downloadUrl, | |
| "Please download Java 25 or later from:\n" + downloadUrl, | |
| "Download Java", | |
| JOptionPane.INFORMATION_MESSAGE); | |
| } | |
| } catch (Exception ex) { | |
| CleanroomRelauncher.LOGGER.error("Failed to open browser", ex); | |
| JOptionPane.showMessageDialog(this, | |
| "Please download Java 25 or later from:\n" + downloadUrl, |
| { | ||
| "java.compile.nullAnalysis.mode": "automatic" | ||
| } No newline at end of file |
There was a problem hiding this comment.
[nitpick] IDE-specific settings files like .vscode/settings.json should typically not be committed to version control as they contain personal editor preferences. Consider adding .vscode/ to .gitignore and removing this file from the repository to avoid conflicts between different developers' IDE configurations.
…the cleanroom wiki on JVM Arguments, closing CleanroomMC#34
|
Note: the dark mode is not fully working on Windows, idk why, probably best to leave it default disabled in config. Do this before merging |
|
Superseded by #36, thank you for the work nonetheless. |
Uh oh!
There was an error while loading. Please reload this page.