Applet Runner is a plugin for JetBrains IDE’s (IntelliJ IDEA, Android Studio, …), Eclipse and NetBeans that allows to run applets in embedded your IDE. Applet Runner Pro offers more possibilities like running the applets in a standalone application, customizing the toolbar, define a start-up url, restrict applets to a whitelist domain or blacklist based on regular expression.
What’s new in 2.5:
Many new applets in bookmarks
Control Dashboard: Monitor resources like website in your IDE
M2 Repo Cleaner: Clean old files in your maven repository
Screen Highlighter: Highlight part of the screen
Website Optimizer: Optimize your static websites
Tree Data Explorer: Combine XML, JSON and YAML viewer
Sheet Stats: Statistics of Excel files
Discotheek: Transform your monitor in a spotlight
Post On Screen: Show text with gradient color
Decoration: Image batch processor
Pastel: Simpler version of Decoration
Poster Font: Text to image title
Poster Font Light: Simpler version of Poster Font
VR Photo Converter: Convert VR180 photo to cross-eyed view or SBS
Dictaphone: Record and replay audio from your computer
The Desktop Watchmaker
Screenshot Crop
Other changes
Added .java to possible files that can be opened
Try to compile .java file if .class not found or less recent on local files
Compile standard project if pom.xml, build.gradle or build.xml is found
Moved some bookmarks to new categories: Multimedia & Developers
Some bug fixes and small improvements
Applet Runner Pro
Possibility to pass javac.release=<version> query parameter for .java URL’s
Option to reload applet when the local file changes (also recompile for .java)
I’m pleased to announce the release of Applet Runner 2023.2.0 JetBrains IDE plugin. This plugin runs in IntelliJ IDEA, Android Studio, PyCharm, WebStorm, PhpStorm and Rider.
This version brings new tools to the IDE. Many new type of files can be opened and more things can be done without you leaving your favorite IDE. What’s new:
Office
PDF Viewer
Microsoft Word Viewer (docx)
Excel & CSV Viewer (xlsx, xls, cvs)
Powerpoint Viewer (pptx)
MP3 Player (mp3, ogg)
Video Player (mp4, mkv, mp3, avi, …)
Text Utilities
Clipboard History
JSON Viewer
XML Viewer
YAML Viewer
Tetris game
HTML Browser (Browser FX) for Windows or if JavaFX runtime is loaded
I’ve just released a new free YAML Viewer that runs in IntelliJ IDEA and other JetBrains IDE’s such as Android Studio.
You can open yml/yaml local files or paste YAML from the clipboard. If you have a large file, the tree navigator and the breadcrumb will help view to view only a small part of the YAML.
To run it, download the free Applet Runner plugin from JetBrains marketplace and execute the free YAML viewer located at https://www.japplis.com/tree-data-explorer/online/yaml-viewer.html.
I’m please to announce the release of Applet Runner 1.3. Applet Runner is a free IDE plug-in (Eclipse, IntelliJ IDEA/JetBrains, NetBeans) that lets you run Java applications embedded in the IDE.
What’s new:
Applet.stop() is called when the applet is closed
If you buy Applet Runner Pro, you will be able to fill in the license key in Applet Runner for NetBeans and Eclipse
Better codebase detection if the URL class location contains ‘/com/’ or ‘/org/’
Many improvements in the application framework (about 150)
Fixed license agreement window not appearing on top of other windows
Translate Ctrl, Shift, Alt to the correct keyboard sign for Mac OS X
Added SettingPanel#getLabel that can also handle tooltips
If Flat IntelliJ look and feel is selected -> unlock the possibility to provide an IntelliJ Theme
Improved quality of taking a screenshot of a component
Improved creating square buttons for IconFontSwing#decorateButton
Catch possible error when getting the clipboard data flavor
Fixed start-up error if FlatLaf not in classpath
Added possibility to skip entering the license key the first day of the installation
Added scroll bar if the setting panel doesn’t fit in the window
Note that Applet Runner Pro 1.3 has also been released. Applet Runner Pro allows to have multiple applets running at the same time and is available as standalone application for Windows, Mac OS & Linux.
There is recently an increased interest to ease the learning curve of Java for students on Day 1 of class. Brian Goetz (the architect of Java) made a proposal to eliminate some code. My proposition is a (independent) continuation to ease the learning of Java.
Day 1 (as proposed by Brian Goetz)
class HelloWord { public static void main(String[] args) { System.out.println("Hello World"); } }
Event Dispatch Thread detection. Let’s face, it when it’s a small program, a lot of people forget to do the UI in the EDT.
Single Java execution java HelloWorld.java would require less code.
No language or compiler change needed.
Proposed implementation
// public domain license - Should be in SwingUtilities
/**
* Show a window containing the provided component.
* The window will exit the application on close.
*
* @param title the title of the window
* @param panel the supplier for the component to show in the window
* @return the created component
*/
public static <T extends JComponent> T showInFrame(String title, Supplier<T> panel) {
Function<T, JFrame> frameSupplier = createdPanel -> {
JFrame frame = new JFrame(title);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(createdPanel);
frame.setLocationRelativeTo(null);
frame.pack();
frame.setVisible(true);
return frame;
};
boolean isInEDT = SwingUtilities.isEventDispatchThread();
if (isInEDT) {
T createdPanel = panel.get();
frameSupplier.apply(createdPanel);
return createdPanel;
} else {
List<T> result = new ArrayList<>();
List<Exception> exception = new ArrayList<>();
try {
SwingUtilities.invokeAndWait(() -> {
try {
T createdPanel = panel.get();
frameSupplier.apply(createdPanel);
result.add(createdPanel);
} catch (Exception ex) {
exception.add(ex);
}
});
} catch (InterruptedException | InvocationTargetException ex) {
throw new RuntimeException(ex);
}
if (!exception.isEmpty()) {
Exception ex = exception.get(0);
if (ex instanceof RuntimeException) throw (RuntimeException) ex;
else throw new RuntimeException(ex);
}
return result.get(0);
}
}
Advanced
The created component is returned so you can use it further in your code. With the returned component, you also have access to the created JFrame by using SwingUtilities.windowForComponent method.
I’ve decided to wrap the exception in a RuntimeException is there is an error during the creation of the component. So you get a similar behavior whether you call this method from the Event Dispatch Thread or not.
Even though the example is with a JLabel, I would expect most of the usage will be passing a Suppier<JPanel> and probably like MyPanel::new as it’s quite common in Swing to have classes extending JPanel.
Another possibility would be to return void and use SwingUtilities.invokeLater() method. This way no need to do all the exception code and no need to have List<T> result. Comment in the reddit discussion if it’s your preference (Link below).
My history
Back when I was a student (1995), I remember it took me half a day to try to show a window on Windows 95 as I was using Borland C++. I copied the code word by word from a book as otherwise it wouldn’t work. A few days later while asking a teacher if we could have an interesting project, he told us “Sun Microsystem has just released a new language, it’s in alpha version but let’s do a project with it.”. I took the language, typed Frame frame = new Frame("Test"); frame.show(); and voilà! It was a whoa moment where I realized I would spend a lot of time with this language 😃.
Conclusion
Quite often, you see in conferences presentations about “what’s new in Java xx”, that we may forget that for some people everything is new. Paving the on-ramp doesn’t have to be a compiler or language change, it could be methods, documentation, videos, …
I think the next step would be to create a RFE ticket in the JDK bug system, but first I will wait for comments in the reddit discussion.