Android Toast like message dialog in Java Swing If you are using SwingWorker background thread for doing long operations and if you want user to see some useful information then ofcourse you need to use process() function as it is invoked by Event Dispatcher Thread. But if you using JOptionPane.showMessageDialog(null, “message”); you can invoke message dialog from background worker thread. ... Read More »
Hooking a function call after another asynchronous function call-jQuery
Hooking a function call after another asynchronous function call-jQuery Fixing bugs has always been day-today tasks for an IT professional. I believe in releasing patches for the bugs in a separate module rather than in the bugged module. This design initially looks weird as to why not correcting the bug at its concerned point, this approach can also be followed ... Read More »
Periodic repetitive background task using Timer task and SwingWorker in Swing
Periodic repetitive background task using Timer task and SwingWorker in Swing Many of you would be aware of Timer task which is part of core java library. It’s used to execute a piece of task after a certain delay periodically on the current thread. This API is very popular and is used in quartz API. But let’s focus our mind ... Read More »
Popup-under hack
Popup-under hack If you are working on a mobile site, you have a constraint of screen size. What if you are loading a URL from a page using window.open(targetURL,’_blank’);. For your information browser will only focus on the window which is currently opened. So, in this case, your window loading targetURL will get focus. And, suppose your boss says to ... Read More »
Java Mail API- Reading OUTLOOK mails
Java Mail API- Reading OUTLOOK mails Using JAVA Mail API for reading mails has been common these days. It’s pretty easy to use. Over the internet you can get boilerplate codes for reading mails from GMAIL or YAHOO, however I find a bit tricky when it comes to reading mails from OUTLOOK. GMAIL and YAHOO provides settings feature where you ... Read More »
Windows BAT file to execute runnable jar file and checks if it is already running
Windows BAT file to execute runnable jar file and checks if it is already running Suppose you have a Java Desktop application, for instance, a SWING application. How would you like to present the runnable JAR file to the client? Am pretty sure many would prefer the BAT script file in case the target machine is WINDOWS based and the ... Read More »
Integrating Facebook Login
Integrating Facebook Login Facebook login is considered as one of the most preferable way for authenticating users. This approach is also very convenient for the users as Facebook has very deep reach among users. This post will illustrate as to how to integrate Facebook login as a way of authenticating users. We will be using Javascript SDK provided by Facebook. ... Read More »
Maven- Creating a Jar together with its dependency Jars into a single executable Jar file
Maven- Creating a Jar together with its dependency Jars into a single executable Jar file Suppose your boss comes and ask you to create a standalone JAVA application. Assuming you being a MAVEN lover, you created a JAVA application using MAVEN dependency management tool. Now suppose you have some MAVEN dependencies that are needed by your JAVA application. Since, it’s ... Read More »
Javascript Constructors- Why it should be used- Object Oriented Programming in Javascript
Javascript Constructors- Why it should be used- Object Oriented Programming in Javascript Mark my words! Javascript is an object oriented programming language, i.e you can create objects to solve your programming problems. In object oriented approach, you create objects that represent things in the system and you add logic for objects to behave, and then objects interact with one another ... Read More »
The Module pattern- Javascript way of hiding data in objects from public access
The Module pattern- Javascript way of hiding data in objects from public access Unlike JAVA, Javascript does not have the concept of private and public on properties or on methods. Let’s create an object called person which has 2 properties firstName and lastName, and also create 2 functions that will be getters for our properties. In Javascript, we can create ... Read More »
Jkoder.com Tutorials, Tips and interview questions for Java, J2EE, Android, Spring, Hibernate, Javascript and other languages for software developers