Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Swing JPanel Issue (not showing up)

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator











 
Dennis Hopfer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Mac OS X - El Capitan

Remainder of JPanel components are not being added.  

Thanks.
Screen-Shot-2017-10-02-at-10.13.00-AM.png
[Thumbnail for Screen-Shot-2017-10-02-at-10.13.00-AM.png]
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I think you are going to have to try out an SSCCE.
Don't give classes names like XXX_000, which is uninformative. Don't use the underscore in identifiers (except constant names).
I think it is usually not a good idea to subclass display components.
Why are you using flow layout when a frame defaults to the better border layout? When are you adding the panels, and when are you making the whole display visible? If you add something after the display becomes visible, that additional component may remain invisible until something happens.
 
Dennis Hopfer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Any help on this one?  It's just 5 Swing classes.  Would you guys give it a look quickly please?

Thanks.
 
Rancher
Posts: 3324
32
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

It's just 5 Swing classes.



With more than a hundred lines of code in each class. Way too much code to look at!

You were ask to post a SSCCE. The point of a SSCCE is to you to understand what you are asking and then simplify the code to make it easy for us to understand.

So you start with a simple JFrame. Does that work?

Then you add a panel with a single JLabel to the frame does that work? Good no you have proven that adding a panel to a frame is not difficult.

Then you add another panel with another JLabel.

Once this structure mimics your real application you have prove how to add multiple panels to the frame.

Then you start making changes to the panels. Instead of a single JLabel you add other components.

The point is to not write all the code first and then start testing. But do it in steps. Then when it stops working you can ask a specific question.

We are not here to debug your program by reading hundreds of lines of code.
 
Dennis Hopfer
Ranch Hand
Posts: 53
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I would need a senior engineer to look here and not these kids.  - ok
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

Dennis Hopfer wrote:I would need a senior engineer to look here and not these kids.  - ok



I'm pretty sure neither Campbell nor Rob can be classed as "kids"...
 
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

Dennis Hopfer wrote:I would need a senior engineer to look here and not these kids.  - ok


It is pretty silly to assume such things without an actual evidence. I gave you thumb down.

Nevertheless, such behaviour of yours is unacceptable in any case, especially with such a well respected Ranch Members, who helping people like you on daily basis.
Of course every member of this community is respected equally (even with post count 1), and that is why this community exists for such a long time. Probably for couple of decades.

My suggestion to you is rather simple, try your best to change *the way you think*. It will pay off in this community and real life.
Staff note (Liutauras Vilda) :

This thread has been locked. We are sorry other contributors who invested their time in answering question.

 
    Bookmark Topic Watch Topic
  • New Topic