Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

and many more ....

 

Make JFrame transparent

java-duke-logo

First create a frame that has a slider in it which will be used to set transparency amount. import javax.swing.JFrame; import javax.swing.JSlider; public class TransparentFrame extends JFrame { public TransparentFrame() { setTitle('Transparent Frame'); setSize(400,400); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JSlider slider = new JSlider(JSlider.HORIZONTAL); add(slider); setVisible(true); } public static void main(String[] args) { new TransparentFrame(); } } Output of this will be: Now add ...

Read More »

Expression Based PathTransitions in JavaFX

javafx-logo

In JavaFX you are able to animate nodes along a path using PathTransition objects. PathTransitions use Shape objects to describe the path they need to animate along. JavaFX provides various types of Shapes (e.g. Polygon, Circle, PolyLine, Path). The Path shape is interesting in that it allows you to create complicated shapes using various movements called PathElement. Some PathElements are ...

Read More »

5 Tips for Unit Testing Threaded Code

junit-logo

Here’s a few tips on how take make testing your code for logical correctness (as opposed to multi-threaded correctness). I find that there are essentially two stereotypical patterns with threaded code: Task orientated – many, short running, homogeneous tasks, often run within the Java 5 executor framework, Process orientated – few, long running, heterogeneous tasks, often event based (waiting on ...

Read More »

Java: Choosing the right Collection

java-logo

Here is a quick guide for selecting the proper implementation of a Set , List , or Map in your application. The best general purpose or ‘primary’ implementations are likely ArrayList, LinkedHashMap, and LinkedHashSet. Their overall performance is better, and you should use them unless you need a special feature provided by another implementation. That special feature is usually ordering or sorting. Here, ‘ordering’ refers to ...

Read More »

How to Cheat at Application Security

software-development-2-logo

Developers need to know a lot in order to build secure applications. Some of this is good software engineering and defensive design and programming – using (safe) APIs properly, carefully checking for errors and exceptions, adding diagnostics and logging, and never trusting anything from outside of your code (including data and other people’s code). But there are also lots of ...

Read More »

Getting started with Scala and Scalatra – Part II

scalatra-logo

In the previous part of the tutorial we created a simple application from scratch and setup Eclipse so we could edit the scala files for scalatra. In this second part of the tutorial you’ll learn how to do the following: How to start scalatra with embedded Jetty for easy testing and debugging Create a simple REST API that returns JSON ...

Read More »

Android Custom Hyperlinked TextView

android-logo

Finding Links in Android is very simple you might have heard of Linkify which is a great class in which there are many static methods for getting a simple job done but the problem is that in Linkify you cannot specify the behavior that you require on clicking the links at the Most what Linkify does is that it simply ...

Read More »

How Hackers Choose Tools

software-development-2-logo

Recently, a 2001 blog post with the title Java’s Cover written by Paul Graham (of Y Combinator fame) spread across Twitter and was linked by all the other usual tech site suspects. The piece was about what Graham called ‘hacker’s radar‘, which he describes as the ability of hackers to ‘develop a nose for good (and bad) technology‘. For his ...

Read More »

Gateway interaction in Smack API

jabber-logo

Gateway interaction is described by XEP-0100. The query xmlns (namespace) used for this is same as IN-Band registration, that is “jabber:iq:register”. Smack API provides an easy way handle gateway interaction with the server. It has predefined classes for the required namespace and operations which one can easily use and do the thing. In this article I will explain how one ...

Read More »

Common code violations in Java

java-logo

At work, recently I did a code cleanup of an existing Java project. After that exercise, I could see a common set of code violations that occur again and again in the code. So, I came up with a list of such common violations and shared it with my peers so that an awareness would help to improve the code ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close