Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

error in JFrame?

Feanors CurseFeanors Curse Member Posts: 70
Hi

Is this error only happening at my pc? When I create a new JFrame, it starts with a little border showing nonsense. And if I drag something like another window over it, it does not correctly repaint it contents. Only if I manually resize or maximize the JFrame, it handles paintings correct. This error happens with all JFrames, I tried official Java codes, so it's not a programming error from me.

This problem is hard to explain, so I hope that there is somebody else having it, knowing how to solve.

Greetings,
Feanor's Curse

[size=1][Blue]For our true nature is sin
[B]Cradle of Filth[/b]

«1

Comments

  • simpsonaddictsimpsonaddict Member Posts: 53
    hi, i get the same problem all the time.
    i dont know how 2 fix it though sorry.
    It really annoys me when im in an ide or any type of java application, the graphics get messed up and dont repaint. I find the best way to deal with it is to minimize and then maximize again so its forced to repaint. Doesnt fix the problem though :-(

  • chamsterchamster Member Posts: 662
    : ...a new JFrame, it starts with a little border showing nonsense. And if I drag something like another window over it, it does not correctly repaint it contents.

    Would you mind posting a [b]very short[/b] sample of some code? And by that i mean the most cut-down version that still produces the error. Chances are that it is something you have missed and yet believe that you haven't.

    Still, that might depend on your machine. What OS and JVM do you use?


    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    chamster@home.se
    http://konrads.webbsida.com

  • simpsonaddictsimpsonaddict Member Posts: 53
    : : ...a new JFrame, it starts with a little border showing nonsense. And if I drag something like another window over it, it does not correctly repaint it contents.
    :
    : Would you mind posting a [b]very short[/b] sample of some code? And by that i mean the most cut-down version that still produces the error. Chances are that it is something you have missed and yet believe that you haven't.
    :
    : Still, that might depend on your machine. What OS and JVM do you use?
    :
    :
    : Kind Regards
    : Konrad
    : ----------------------------
    4 me it doesnt matter what program it is. IE i use bluj for an ide, it does the same thing often. Im currently running win98SE with jdk1.3.1
    : (+46/0) 708-70 73 92
    : chamster@home.se
    : http://konrads.webbsida.com
    :
    :

  • Feanors CurseFeanors Curse Member Posts: 70
    I'm running Windows XP with J2SDK 1.4.0. I'll give an Code-Example soon, but I'm not at home at the moment, so you have to wait until Tuesday / Wednesday. Thanks to the both of you for your answers!

    : : : ...a new JFrame, it starts with a little border showing nonsense. And if I drag something like another window over it, it does not correctly repaint it contents.
    : :
    : : Would you mind posting a [b]very short[/b] sample of some code? And by that i mean the most cut-down version that still produces the error. Chances are that it is something you have missed and yet believe that you haven't.
    : :
    : : Still, that might depend on your machine. What OS and JVM do you use?
    : :
    : :
    : : Kind Regards
    : : Konrad
    : : ----------------------------
    : 4 me it doesnt matter what program it is. IE i use bluj for an ide, it does the same thing often. Im currently running win98SE with jdk1.3.1
    : : (+46/0) 708-70 73 92
    : : chamster@home.se
    : : http://konrads.webbsida.com
    : :
    : :
    :
    :


    [size=1][Blue]For our true nature is sin
    [B]Cradle of Filth[/b]


  • chamsterchamster Member Posts: 662
    That's very interesting, actually. The question that i'm most curious about is wheter it's software thing (which would be solved pretty easy by installing a newer version of something) or hardware (in which case we'd have hardware that is not Java-capable).


    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    chamster@home.se
    http://konrads.webbsida.com

  • Feanors CurseFeanors Curse Member Posts: 70
    Well, I installed the new J2SDK1.4.1 and the error no longer occurs, so it seems like there has been a bugfix :-).

    : That's very interesting, actually. The question that i'm most curious about is wheter it's software thing (which would be solved pretty easy by installing a newer version of something) or hardware (in which case we'd have hardware that is not Java-capable).
    :
    :
    : Kind Regards
    : Konrad
    : ----------------------------
    : (+46/0) 708-70 73 92
    : chamster@home.se
    : http://konrads.webbsida.com
    :
    :


    [size=1][Blue]For our true nature is sin
    [B]Cradle of Filth[/b]


  • chamsterchamster Member Posts: 662
    That's good to hear. Although, my curiosity remains unsettled...


    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    chamster@home.se
    http://konrads.webbsida.com

  • teekayteekay Member Posts: 24
    [b][red]This message was edited by teekay at 2002-9-19 4:35:26[/red][/b][hr]
    If I understand correctly,
    I got that rubish frame too.
    But if I add :

    this.setSize(new Dimension(300, 267));

    in order to set new frame size
    I get the frame perfect.

    Try that

    Teekay


  • chamsterchamster Member Posts: 662
    : But if I add this.setSize(new Dimension(300, 267));

    So, the above makes the frame look normal. How did you use to set the size before (when the mysterious rubbish appeared)? I'm very curious how that may happen.


    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    chamster@home.se
    http://konrads.webbsida.com

  • Feanors CurseFeanors Curse Member Posts: 70
    I simply used [italic]pack[/italic], but if I think, I also used [italic]setSize[/italic] without any effect, but I'm not that sure.

    : : But if I add this.setSize(new Dimension(300, 267));
    :
    : So, the above makes the frame look normal. How did you use to set the size before (when the mysterious rubbish appeared)? I'm very curious how that may happen.


    [size=1][Blue]For our true nature is sin
    [B]Cradle of Filth[/b]


«1
Sign In or Register to comment.