Bookmark This Page
Monday, 08 February 2010

My Writings. My Thoughts.

后来 [Hòu Lái] – Afterwards

Posted on: September 25th, 2009 by Christian Chandra


In: Music | 82 Comments

by : 刘若英 [ liú ruò yīng ] :smile:

hòu lái wǒ zǒng suàn xué huì le rú hé qù ài
后来我总算学会了如何去爱
Afterwards, I finally learned how to love

kě xī nǐ zǎo yǐ yuǎn qù xiāo shì zài rén hǎi
可惜你早已远去消逝在人海
but you alreadly have gone and disappeared in the crowds.

hòu lái zhōng yú zài yǎn lèi zhōng míng bai
后来终于在眼泪中明白
Afterwards, though all the tears, I finally understood

yǒu xiē rén yī dàn cuò guò jiù bù zài
有些人一但错过就不在
that you can only miss somebody once.

Wait..! Wanna see full article of this post? Click here to read more…

Java GUI :: About Container

Posted on: September 12th, 2009 by Christian Chandra


In: Java Graphical User Interface | 7 Comments

In the previous chapter we already made a square window using JFrame class.
Before inserting something to that window, we need to declare an intermediate container first.

What is intermediate container?
a Container hierarchy can be divided into 3 part:

  • Top-level container
    which is JFrame in java. Just imagine it as a root element of any other components.
  • Intermediate container
    Every atomic-component can’t directly inserted to Top-Level container. We need to create a panel first, so if you want to insert a component you need to put it inside a panel.
  • A component it self
    A component is just like button, combo box, text area, form, etc.

There are several ways to create a panel. Let’s use the simplest one for now.
Insert this code below your JFrame code:

myFrame.getContentPane().add(a component); 

Here the full listed program:

import javax.swing.*;
public class MyFirstGUIApps
{
	public static void main(String [] args)
	{
		JFrame myFrame = new JFrame("My GUI Application");
		myFrame.setSize(300,300);
		myFrame.setLocation(100,200);
		myFrame.setVisible(true);
		myFrame.getContentPane().add(new JButton("Click Me"));
	}
}


Wait..! Wanna see full article of this post? Click here to read more…

My First Java GUI Application

Posted on: September 12th, 2009 by Christian Chandra


In: Java Graphical User Interface | 29 Comments

OK, let’s start making a simple application using java GUI.
FYI, every GUI programming always consist of layers, which the root is usually called Top-Level Windows, in java we call it Frame.
Making a new frame is not difficult, just put this code inside your main. ;-)

JFrame myFrame = new JFrame("My GUI Application");

JFrame provides the basic attributes and behaviors of a window (e.g., a title bar and buttons to minimize, maximize and close the window).
JFrame is a class, so we can make an instance of it and use its method for doing something.
JFrame has several method such as:

  • void setSize (int x, int y)
  • void setLocation(int x, int y)
  • void setLocationRelativeTo(Component c)
  • void setResizable(boolean b)
  • void setVisible (boolean b)
  • public void setBounds(int x, int y, int width, int height)


Wait..! Wanna see full article of this post? Click here to read more…

Introductions to Java GUI

Posted on: September 12th, 2009 by Christian Chandra


In: Java Graphical User Interface | 48 Comments

Java Applet Logo

Java Applet Logo


Face it, you need to make GUIs – If you’re building an application that other people are going to use, you need a graphical interface. If you’re building programs for yourself, probably you don’t want a graphical interface. Even if you believe that the rest of your natural life will be spent writing server-side code, where the client UI is a web page, sooner or later you’ll need to write tools, and you’ll want a graphical interface. :cool:quoted from O’Reilly Head First Java


Wait..! Wanna see full article of this post? Click here to read more…

Learn, Write and Publish..

Posted on: September 10th, 2009 by Christian Chandra


In: Others | 8 Comments

Hello everyone..
This is my first post in this blog.
I already create several blogs before, but no one is well-managed.
This time, i hope i could manage this blog as well as possible.
My goal is simple, just wanna share any knowledges that i’ve got from university (or from anywhere else), and then write it down in here.
So when i forgot about something, what i need to do is just open this blog and everything will be all-right.

Last but not least, don’t forget for giving me a comment, i will really appreciate it.

regards,
Christian Chandra

PHVsPjxsaT48c3Ryb25nPndvb19hYm91dDwvc3Ryb25nPiAtIDwvbGk+PGxpPjxzdHJvbmc+d29vX2Fib3V0bGluazwvc3Ryb25nPiAtIGh0dHA6Ly93d3cuY2hyaXN0aWFuY2hhbmRyYS5jb20vaG9tZS5waHA8L2xpPjxsaT48c3Ryb25nPndvb19hZHNfcm90YXRlPC9zdHJvbmc+IC0gdHJ1ZTwvbGk+PGxpPjxzdHJvbmc+d29vX2FkX2ltYWdlXzE8L3N0cm9uZz4gLSBodHRwOi8vd3d3Lndvb3RoZW1lcy5jb20vYWRzL3dvb3RoZW1lcy0xMjV4MTI1LTEuZ2lmPC9saT48bGk+PHN0cm9u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