Search:

Type: Posts; User: Norm

Page 1 of 2 1 2

Search: Search took 0.10 seconds.

  1. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    I'm not sure I understand what you are asking. Is it a question about the code or what?
  2. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    4)panel with the image and the button added to the panel with the gridlayout

    That says to create a panel, add the two things to it and add that panel to the gridpanel. See post#70

    That's it...
  3. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    4)panel with the image and the button added to the panel with the gridlayout

    No. That code does the opposite: adds gridpanel to the cellpanel (which should contain the image and button) Look at...
  4. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Now what about step 4?


    That has nothing to do with creating the GUI.
  5. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    The order of the steps is important.


    Try the steps in the order I recommended and see what happens then.
  6. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    It looks like steps 5 and 6 (from post#106) are not done last. They are done before steps 2, 3 & 4

    For learning how to create a GUI make a test program as done in post #51. When that works,...
  7. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    From post#92, re-ordered:

    1)image created
    2) new image added to a panel
    3) button added to panel
    4)panel with the image and the button added to the panel with the gridlayout
    5)filled panel...
  8. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    You do NOT need a for statement that only loops one time.
  9. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    look at post#70 for how to put the image above the button. There isn't any Database used in the code from post#51. Using a DB just makes it harder for this testing. Use a single image that is read...
  10. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    A suggestion to learn how to make a GUI with image over button:
    Take the code from andbin's post#51 and modify it to build panels with images over buttons using the technique shown in post#70.
    The...
  11. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    What is a loop that loops once?

    See post#70.
    Put them in a panel and add that panel to the panel with the gridlayout. See steps 4 & 5 in post#92
  12. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    No, that does not look like a list of steps in pseudo code.
    The code is missing several steps.

    What does the for loop that loops 2 times do? Why is it there?

    Are there supposed to be buttons...
  13. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Take the questions one at a time and decide when they should be executed. Make a list of pseudo code statements to show when each should be executed.

    This project may be too advanced for your...
  14. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    The methods should be called when they are needed to do something.
    1)When does the GUI need to be packed and shown?
    2)When does a filled panel need to be added to the frame?

    3)When should the...
  15. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    One problem I see inside the while loop is there are method calls being made that should only be made one time, not every time an image is created:
    setVisible() - only needs to be done ONE time...
  16. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Its a little better, but there are still too many statements starting in the first column.
    And there are too many statements that are indented that should NOT be indented:

    ImageIcon icon = new...
  17. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    No.Too many nested statements start in the first column making it hard to read and understand the logic in the code.
    The }s should not be one above the other (in the same column)

    See post#51 for...
  18. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Can you edit the code and format it properly?
    Nested statements should be indented
    }s should NOT be hidden at the end of statements. Put them on their own line.


    No, the compiler will...
  19. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Can you fix the formatting of the code? The indentations are not right. There are missing }s

    The posted code is a mess. There are a lot of definitions missing.
  20. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    You don't need the database to work on the GUI problem you are having. For testing you can use a single image read from the disk.

    Later when the GUI is working, you can put in the code to read...
  21. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Please edit the post and properly format the code. Nested statements need to be indented. Too many statements are starting in the first column. See post#51 for an example.

    For testing the creation...
  22. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    How have you tried using the code provided by andbin? You need to try and when you have problems, post the code and the error messages.
  23. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Can you make a small, complete program that compiles, executes and shows the problem?
  24. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Did you read my last post? What is wrong with the description I posted there?


    In the image in post#65 I see 5 rows with 4 columns of rectangles all containing images. Where are the buttons in...
  25. Replies
    119
    Views
    6,329

    [SOLVED] Re: javadisplay images

    Sorry, I don't go to other sites.

    If it is not one of the two choices I asked about, I don't understand what you are asking.

    What is wrong with this explanation?
    would it be like this:
    XXX...
Results 1 to 25 of 41
Page 1 of 2 1 2