   [java] JFrame and peerless components
  for a pretty simple interactive program i''m writing, which is almost entirely swing based, im subclassing JFrame to both make my window and set up the two or three classes (which in turn extend JPanel) that interact within that window.however, i was just reading about swing components being peerless and all, and how JFrame and JWindow are the only swing components that arent lightweight.so, my question is, does it really matter that i am subclassing jframe directly? its easier for me for customization purposes, i only need one set of defining variables, etc, but i dont want to mess with swing''s whole interface with AWT. am i going to cause any problems or am i worrying needlessly?thanks,justo 
  I subclass JFrame all the time, everyone does really. The fact that it''s heavyweight isn''t really relevant here, it''s always top level, and Sun obviously designed it with the idea that you''d be adding lightweight components to it.Although most of the time there''s no real reason to subclass JFrame beyond a bit of convenience. JFrame''s designed well enough to be almost completely usable from the outside. It''s up to you I guess. ;  thanks, thats just what i needed to hear ;  All that heavyweight means is that the component drawn using the OSes own widgets.  AWT is all heavy weight, Swing is almost all lightweight.  The reason JFrame and JWindow are heavyweight is because they are the anchor into the OSes GUI.   First make it work,then make it fast.--Brian Kernighan"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book