Search:

Type: Posts; User: andbin

Search: Search took 0.25 seconds.

  1. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    So you want an idea for a game? There are lot of games that are made with a "grid" of images: Tic-tac-toe, Chess, Reversi, Peg solitaire, Sudoku, Scrabble. Just to name a few.

    In these games the...
  2. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    stresstedout, listen please. This thread has arrived at post #123 (with my current answer) and we have spoken about a lot of things. Still now I don't know if you have well understood the concepts...
  3. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    Honestly I also did not understand this english phrase ..... :((
  4. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    For the very last time ....


    import java.awt.*;
    import java.net.*;
    import javax.swing.*;

    public class ButtonAndImageGrid {
    private static String[] isbnCodes = { "0636920026518",...
  5. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    First, I am very disappointed by the fact that I continue to give my help and you don't understand.

    I have told you to create, for each cell in GridLayout, a new JPanel that contains JButton and...
  6. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    So you want the button above and image (label) below?


    JPanel cellPanel = new JPanel(new BorderLayout());
    cellPanel.add(yourButton, BorderLayout.NORTH);
    cellPanel.add(yourLabel,...
  7. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    In my answer #42 I told you one thing and I can repeat here.

    If you want that every cell (of GridLayout) contains a JLabel and a JButton, you have to create, for each cell, a new JPanel with a...
  8. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    Ok, try the following example (note: it's a bit compact/contrived, just to be short. Don't do this in "real" apps!).


    import java.awt.*;
    import javax.swing.*;

    public class GridLayoutTest {
    ...
  9. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    GridLayout does a simple thing: it takes the size of the container (in which GridLayout is assigned) and divides it in NxM equally sized cells. So the main question is: who controls the size of the...
  10. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    What do you mean? Can you be more precise?
  11. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    There are many ways to develop and present a "memory" game (just only considering Swing as GUI), so there isn't a unique answer/possibility.


    Technically it's perfectly possible.


    Using mouse...
  12. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    This depends on what you want .....
    Layouting with AWT/Swing is not difficult ..... if you have the "basics".


    Each "cell" in GridLayout can contain only 1 component. Instead to put a JLabel...
  13. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    Not exactly .... and don't use available() if you don't know exactly what it does!

    Yesterday I told you some things and more than one time. I don't understand why you don't understand .....


    ...
  14. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    while (result.next()) {
    image = result.getBytes("content");
    }
    // Here you have exausted the record-set. And you have not created any image (just got the raw image stream).

    // Here you create 1...
  15. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    If you have 1 image in each record, then create the image for each record. That is, into the loop. Not outside.
  16. Replies
    119
    Views
    6,320

    [SOLVED] Re: javadisplay images

    Here you are not creating 1 image for each record .... you have "exausted" the record set and then after, at the end, you create 1 image.
    So what can you expect from a similar code?
Results 1 to 16 of 16