Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

scroll pane

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


well everything seems to be working fine only the scroll pane is not working can someone have a look please.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

simrat khanuja wrote:well everything seems to be working fine only the scroll pane is not working can someone have a look please.


For what? I'm afraid we're not a coding service, simrat.

Does it work? Have you tested it thoroughly? It would also help if you indented your code properly.

Also: Please don't post multiple threads for the same question. I've locked your other one on the same subject.

Winston
 
lowercase baba
Posts: 13018
66
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

simrat khanuja wrote:well everything seems to be working fine


simrat khanuja wrote:the scroll pane is not working


These two statements contradict each other.

Generally, when you ask for help, your job is to make it as easy as possible for other to help you. That means posting properly formatted code. Many people will look at this, see the java that is hard to read, and figure "I can better spend my time somewhere else".

Next, you should tell us what the problem is EXACTLY. "not working" could mean
  • not show up
  • show a vertical but not horizontal
  • show up but not actually scroll anything
  • crash the program when used
  • probably about 100 other things

  • People who hang out here tend to be programmers. Programmers like specs. "Specs" is derived from "specifications". So please tell us all the details on what EXACTLY you mean by "not working".
     
    simrat khanuja
    Greenhorn
    Posts: 12
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    simrat khanuja wrote:

    well everything seems to be working fine only the scroll pane does not show up at all, can someone have a look please.

     
    Marshal
    Posts: 74637
    335
    • Likes 1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Have you read the Java Tutorials about Scroll Panes?

    It looks to me that you are doing two things wrong in your development process.
    One is trying to do too much in one class. You should use Swing classes for display. Not to implement Listeners, nor to implement database queries. Put them into different classes. Your class is turning into a stovepipe, which is a well‑known antipattern. Separate all the database access into classes for itself. Get that working at the command line before you consider putting a GUI on it.
    The other thing I think you are doing wrong is doing too much all at once. You have written 90 lines of code with poorly‑named variables in and you are wondering why the scroll pane isn't working right. You should compile the code after every ten lines or less.

    Please go back and format the code properly so everything is correctly indented. That catch for example in not correctly formatted. Give all the variables names which tell us what they mean. Don't have all the Components as fields. They can probably all be converted to local variables in the constructor or a setUpGUI method. Don't invoke static members on an instance name. Use a class name; this counts as an instance name.

    I think this discussion would fit better in our GUIs forum. Moving.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic