Here i have given the JAVA code to make a popup that happens exactly like the gmail desktop application does.It uses a JFrame to make the window. package com.oksbwn.popUp; import java.awt.*; import java.awt.event.*; import javax.swing.*; import com.oksbwn.ErrorHandling.handleExceptions; import resources.RscLoader; public class popMe extends JFrame { private static final long serialVersionUID = 1 L; public static void main(String[] args) throws Exception { new popMe(“hi”, “from Bikash”, “ok”, 15, 125); } public popMe(String message, String header, String image, final int time, int height) { Runnable r = new newThreadPop(message, header, image, time,…
Read MoreYear: 2019
Get System IP address in JAVA
This is a code snippet to get the current IP address of a system. import java.net.InetAddress; import java.net.UnknownHostException; public class IpAdress { //public static void main(String[] args){ public static InetAddress getIP() { InetAddress ip; try { ip = InetAddress.getLocalHost(); return ip; } catch (UnknownHostException e) { e.printStackTrace(); } return null; } } Bikash Narayan PandaDeveloper, Tinkere, a proud Dad.. love to spend my available time playing with Tech!! wglabz.in
Read MoreTaking Screenshots using JAVA
Screenshots are often required while working with projects. There are many solutions available, like the inbuilt Snipping Tool (Windows).
Read MoreAutomatic project structure/git creation in Windows
While working in projects on a daily basis, as I do for YouTube videos, we tend to create the same folder structure and related repositories every time, as we move to the next project. For me, it is like creating folders for video, code, uploaded video, schematics and so on and in my most of the video for YouTube, I always create almost same folders. Along with that, I create GitHub repository to host the codes that I use in the project or tutorial to distribute. And I hate doing the…
Read MoreConnected Weighing scale using HX711 and ESP8266
Since I got into Home Automation System, I have always wanted a central system with as much as information about me starting from my food habit to each and everything that can be measured or collected. You can say that it is greatly influenced by JARVIS of Iron Man which came around my Engineering days. Coming to the topic, I recently managed to connect a regular bathroom weighing scale to my Home Automation System (OpenHAB) using MQTT. So basically this post is all about how to do that. For the weighing…
Read More