• Post Reply Bookmark Topic Watch Topic
  • New Topic

Where to embed my code?

 
Mona Alsh
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I'm using Netbeans to build the GUI of my application. what is the best practice for doing so?
How do I include the functionality in my application?
Is it only through implementing the actionPerformed in the form code view or should I create another class?
Let me describe my problem:

my application should take the selected checkboxes and comboboxes as an arrayList objects and send them through a network stream to another window.
when I embed my code into the form code view I got a lot of exceptions.

Can you please help me?

here is my code that I want to embed in the actionPerformed, but before that I have to initialize the Lists
 
Swastik Dey
Rancher
Posts: 1670
7
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mona,

It's always good to separate the code into different modules. UI creation can be in one function, list initialization can be in a different function, and network connectivity (as you have mentioned you are using network stream) can be in a different class altogether.

Correct me if I am wrong. As far as the exceptions are concerned, without looking how are integrating the things it's tough to find out whats going wrong.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!