Hi there,

I'm just starting with Java and Desktop programming but I have some doubts, for example: You are going to write a new application, you go there, draw your ER for your database, UML, etc. My problems is when I need to integrate the interface with the program logic, for example, in netbeans I can create a new frame using the palette but I can't find a way to fill that frame without having to put something inside the frame class, I would like something more generic. Sorry if I coundn't explain it in a clean way, if so, tell me that I'll try again =).


You don't need to do anything to your frame class to fill a frame. All frame classes (including java.awt.Frame and javax.swing.JFrame) come with add methods that can be used to fill a frame with stuff, so that means that frame classes are ready to be filled without any modifications.

  1. if you are just starting with Java, for now, stick with console applications and learn the language
  2. do yourself a favour and do not use the NetBeans Swing editor. it generates hard-to-read-harder-to-maintain code that can be described as "crap". the worst of it is: you don't learn to program a GUI in Swing, you "learn" how to click, drag and drop.
    if that's the only way you know how to create Swing code, I hope for your sake you never get a job as Swing developer in a company that doesn't allow you to use NetBeans.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.