• Post Reply Bookmark Topic Watch Topic
  • New Topic

scroll pane  RSS feed

 
simrat khanuja
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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.
 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • 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
 
fred rosenberger
lowercase baba
Bartender
Posts: 12529
48
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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
    • 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.
     
    Campbell Ritchie
    Sheriff
    Posts: 55351
    157
    • Likes 1
    • Mark post as helpful
    • send pies
    • 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.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!