Posts Tagged ‘how to’

Moving the blog to my new website

May 22, 2013

Hello everyone,

I regret the inconvenience caused all of the blog followers and the visitors due to the movement of a lot of contents to my new website. I would like you all to visit my new website http://blog.manoharbhattarai.com.np/ and follow for more interesting and helpful contents.

Please visit http://blog.manoharbhattarai.com.np/ to subscribe and follow the blog there to get updates on my new posts. Would love to see your presence there with your valuable comments.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई)
Personal Website : http://www.manoharbhattarai.com.np/
Personal Blog : http://blog.manoharbhattarai.com.np/
Website : http://www.logicinterpreter.com/

Advertisements

The resource is not on the build path of a java project eclipse

May 11, 2012

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई)

Ubuntu 12.04 on Virtualbox pae error – “Unable to boot – please use a kernel appropriate for your CPU”

May 5, 2012

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई)

How to Create Translucent and Shaped Windows in java.

September 4, 2011

Hi all,

I am back after a long time. This time I want to tell you all how I set a window as translucent in java. It was a very cumbersome thing to do before recently. From JDK 6 update 10, java has this facility to set the window as translucent  and its very easy.

Recently I did this in one of my projects and wanted to share it with you all.

As of the Java Platform, Standard Edition 6 (Java SE 6) Update 10 release, we can add translucent and shaped windows to our Swing applications.

The translucent and shaped window API was first added to the Java SE 6 Update 10 release as a private API. This functionality was moved to the public AWT package in the JDK 7 release.

Here is an example :

import java.awt.*;
import javax.swing.*;
import static java.awt.GraphicsDevice.WindowTranslucency.*;

public class MyWindow extends JFrame {
    public MyWindow() {
        super("MyWindow");
        setLayout(new GridBagLayout());

        setSize(300,200);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        add(new JButton("Just a Button"));
    }

    public static void main(String[] args) {
        // Determine if the GraphicsDevice supports translucency.
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
 GraphicsDevice gd = ge.getDefaultScreenDevice();

        //If translucent windows aren't supported, exit.
        if (!gd.isWindowTranslucencySupported(TRANSLUCENT)) { 
 System.err.println( "Translucency is not supported"); 
 System.exit(0); 
 }

        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                MyWindow tw = new MyWindow();

		// Set the window to 55% opaque (45% translucent).
                tw.setOpacity(0.55f);

		// Display the window.
		tw.setVisible(true);
	    }
        });
    }
}

To learn more please check this link.

 

Here is how you can select which methods to use according to your JDK version.

 


Regards,
Manohar Bhattarai (मनोहर भट्टराई)
http://about.me/manoharbhattarai
http://www.facebook.com/pages/Manohar-Bhattarai/130973796914160
Blogs:
https://manoharbhattarai.wordpress.com/
http://manoharbhattarai.posterous.com/
http://manoharbhattarai.blogspot.com/
Microblogs:
Twitter :- http://twitter.com/mhrbhattarai
Identi.ca :- http://identi.ca/manoharbhattarai

How to add spring capabilities to Eclipse IDE using SpringSource Tool Suite from the Release Update Site

July 9, 2011

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

 

Regards,
Manohar Bhattarai (मनोहर भट्टराई)

Remove question mark and add your own icon to the ubuntu 11.04 natty narwhal unity launcher

June 28, 2011

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई)

How to Create an executable JAR file

April 7, 2011

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई) 

Add xfce or KDE Desktop environment to ubuntu

November 28, 2010

Hi all,

If you want to add xfce/KDE desktop environment to your Ubuntu(Gnome), that can be done  using following steps-

1. Go to System->Administration->Synaptic Package Manager.

2. Click search and write xubuntu-desktop/kubuntu-desktop and search.

3. Check Mark for installation and then click Apply

This will install xubuntu-desktop/kubuntu-desktop to your Ubuntu system.

To login to xfce or KDE environment change the session on the main Log-on screen.

I have three desktop environments(Gnome(default), xfce and KDE) on my Ubuntu 8.04 system.

Enjoy all environment. 🙂

 

Regards,

Manohar Bhattarai

http://about.me/manoharbhattarai

 

Execute java program in ubuntu from terminal

September 23, 2010

Hi everyone,

I have moved this post to my new blog site. Click here to get to the post.

Thank you.

Regards,
Manohar Bhattarai (मनोहर भट्टराई) 

Echofon 1.9.6.6 is not working on FF 3.6.8 Ubuntu customized version

September 6, 2010

Hi all,

Recently i updated echofon addon for firefox and it stopped working on my FF 3.6.8 showing an error message. I was unable to use echofon. So today i found a solution and it is working again. Actually it is not solution for recent updated version.

To solve this problem i installed the old version of echofon again and it is working fine now.

Here is the link ==> https://addons.mozilla.org/en-US/firefox/addon/5081/eula/88620?src=version-history

Hope it helps those having similar problem.

Regards,

Manohar Bharttarai

http://manoharbhattarai.com.np/


%d bloggers like this: