Thursday, May 15, 2008


Here's the conversation that made me think I need to post this entry


Thanks for your test_example, I' am now trying to get a result from that, it seems that there are still some errors.

as soon as it works i'll let you know.

Best regards,


----- Original Message -----

From: Kiran

To: Narjes Hamed

- Hide quoted text -

Sent: Wednesday, May 14, 2008 6:09 AM

Subject: Re: my project: Vlan Network Simulator with Java / help!


Please find attached a simple java project. Tinker around with the code and u'll learn how to fulfill your requirement.



UVCE, Bangalore

On Sun, May 11, 2008 at 1:10 PM, Narjes Hamed <> wrote:

Hi Kiran!

Thanks for yr prompt reply, I ask u again if you may provide me with a java source showing relations between buttons and frames:

For example if I have a Frame "A" and a Frame "B" and if I click on button "a" included in the Frame "A", the Frame "B" is opened, using of course action commands.

Please try and let me know how to do that.

Kind regards


----- Original Message -----

From: Kiran

To: Narjes Hamed

Sent: Sunday, May 11, 2008 6:14 AM

Subject: Re: my project: Vlan Network Simulator with Java / help!


Its quite nice to hear from you. I really do not know the extent to which i can help you, but you wouldn't be facing problem's 1 and 3 if u are using netbeans. All u need to do is to have a new swing based desktop application project with database support enabled. Its pretty to add the events up in the GUI. and yeah u can use either an mysql or a jdbase database. For your second problem, take your input as a string, use a loop to take out individual chars, group from one '.' to another '.' and parse each group into an int for validating or create your own customized object to handle that type.



UVCE, Bangalore

On Sat, May 10, 2008 at 6:23 PM, Narjes Hamed <> wrote:

Dear Kiran,

Good day,

I visited your blog and I found it very interesting, I wish I don't disturb you with my intrusion ,

I am a Tunisian student and I have to prepare a java project concerning " vlan network simulator " within one month;

I use Netbeans 6.1 and Jbuilder 2005 but as I' am not experienced in java language I don't know how to start.

I enclose with this message the starting of my project;

My main problems are:

1 / How to use the function "actionevent", "actioneventlistener",..........etc, to connect buttons with other frames to open them or close them.

for instance if I click on "about" menu item button the frame"about" appears.

2 / How to format a textfield to input an IpAddress: ***. *** .***. ***

3 / How to prepare a database to intoduce:

- user name - password

- connection parameters ( IpAddress, port, socket......)

May you help me? some links or other ideas.....

your assistance welcomed.

Many thanks in advance and best regards.

Narjes Hamed

Sousse / Tunisia


  1. File->New Project->Java->Java Desktop Application
  2. Name it as swing and choose basic application shell
  3. Right click on swing new->Jframe Form and name it as NewJFrame
  4. Draw a button on the swing view and select action from the right panel
  5. Select create new action and name it ShowNew

    Screen clipping taken: 5/15/2008, 12:00 PM

  6. Your show code must be as follows, first add a private Jframe x; in your list of variables then,



    public void ShowNew() {



    x=new NewJFrame();x.setBounds(50, 50, 200, 200);



  7. Remove entirely the main function in the NewJFrame
  8. Now u get the following when u click show, voila done now rite? Any more queries mail me at

    Screen clipping taken: 5/15/2008, 12:11 PM