How to add an Icon to a Java application
This are the instructions to add an icon the a Java Swing application. Icon is loaded from an image. In order to load this image we make use of File and Buffered Image classes. Icon can be shown in different…
This are the instructions to add an icon the a Java Swing application. Icon is loaded from an image. In order to load this image we make use of File and Buffered Image classes. Icon can be shown in different…
A developer may need to shut down a computer from a Java application. This post explains how it can be done. Ways to identify operating system In all solutions proposed here we are calling the OS directly to shutdown…
Images can be displayed in Java Swing using object JLabel. This is the partial code: JLabel label = new JLabel(); try { BufferedImage img = ImageIO.read(new File(IMG_FILES_PATH + IMG_FILENAME)); ImageIcon icon = new ImageIcon(img); label.setIcon(icon); } catch (IOException ex) {…
I programmed my own function, based on other examples: /** * Method that scale an image (BufferedImage) into the specified dimensions * @param sbi Source image * @param imageType Image type among BufferedImage.TYPE_… constants (example: TYPE_INT_ARGB) * @param dWidth Image…
This post explains how to create a JAR (Java ARchive) file for a Java project. Steps to create a JAR file for a Java project The steps to create a JAR file for a Java project are: Ensure your project…
This solution is only available from JDK 9. In other to set the JDK version on NetBeans, right click on Project > “Properties” >> “Sources” > “Source/Binary format”; and “Libraries” > “Java Platform”. package main; import javax.swing.JFrame; import javax.swing.JLabel; import…
This solution works only for .wav files. Source code: public void playSound() { try { AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(“”).getAbsoluteFile()); Clip clip = AudioSystem.getClip(); clip.open(audioInputStream); clip.start(); } catch(Exception ex) { System.out.println(“Error with playing sound.”); ex.printStackTrace(); } } External References “Playing…
Android Studio is the official Google’s IDE to develop apps for Android, based on IntelliJ. 1. Download file Download latest Android Studio version for Mac (3.2.1 at the time of this article). 2. Install application Double-click on .dmg file…
https://docs.microsoft.com/es-es/windows-hardware/drivers/install/obtaining-a-software-publisher-certificate–spc-
This is a non-exhaustive list of prototyping and mockups apps. Balsamiq Commercial, 30-day trial version Web-based. InVision Marvelapp Freemium. Web-based. Moqups Freemium. Web-based. Pencil Project Open source, free. Desktop-based. There is a discontinued web-based version (Mozilla…