Search:

Type: Posts; User: Lorack

Page 1 of 2 1 2

Search: Search took 0.09 seconds.

  1. Replies
    0
    Views
    1,821

    Red Color glColor4f

    Hello.

    I was able to draw a 3D cube with JOGL lib.
    I was setting some color with alpha... but with the red Color the alpha doesn't seems to work...Why?


    public void display(GLAutoDrawable...
  2. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Well I was trying to move the pad somehow



    I removed the JPanel and now a loads of error popup

    Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation...
  3. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    arkanoidGame.java


    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;



    import javax.swing.*;
  4. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    I created a new method in arkanoidGame

    public void actionPerformed(ActionEvent e) {
    thePad.actionPerformed(e);
    System.out.println("The Pad is being Called");
    }


    doesn't print anything...
  5. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Well in my class pad some methods are in there to make it move but they are not being called
  6. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    So why if the bounds of the ball is the full screen it hides the pad?
  7. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Well you right I don't need a translucent component. I got my two object showing right now I changed the bound for theBall.setBounds(0,0,200,200) and the pad showed up because it was underneath it.
    ...
  8. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    I understand this... The playing surface is the JPanel or the FlowLayout?
    even if I do something like this :

    panel.setBackground(Color.TRANSLUCENT) or
    layout.setBackground(Color.TRANSLUCENT) ...
  9. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Well theBall has to go anywhere on the screen so the bounds are 0,0,800,600 which takes all the screen so I can't see the thePad
  10. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    I need to set the background Translucent.. And I have no method in theBall object to do it.
  11. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Yes all draw on the same surface
  12. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Ok I got it but... I need to make the layout translucent... I changed my code a bit :

    I Created objects of class ball and pad I don't really know if it's a good idea tho!


    import java.awt.*;...
  13. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    It's an error :
    The method add(Component) in the type Container is not applicable for the arguments (void)
  14. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    I'm trying to use setBounds it doesn't work I tryed to use it that way :


    pane.add(new ball().setBounds(60,60,60,60));
  15. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Can i have overlapping bounds?
  16. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    How can I do it then? Can I put them where ever I want them to be?
  17. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    I added the drawLine() and the lines show up.

    The problem is the bound of each they are not right... I tryed with the method setBounds but it doesn't seem to work
  18. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    They are not showing up
  19. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    I added this since :

    pane.add(new ball(),BorderLayout.NORTH);
    pane.add(new pad(),BorderLayout.CENTER);

    I think that's why we get some random bounds...
  20. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    I get the same thing
  21. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    arkanoidGame.java


    import java.awt.*;
    import java.awt.event.*;


    import javax.swing.*;
  22. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Right none of those two classes are being called



    No the button is a nice size and it's at the bottom of the screen



    pane.add(controls,BorderLayout.SOUTH);
  23. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    No but I got a button showing up


    controls.add(startButton);

    startButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    panel.validate();...
  24. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    in the addComponentsToPane method
  25. Replies
    71
    Views
    6,227

    Re: Mutiple classfile, JPanel nothing shows up

    Ok!, I got rid of my myFrame class I think it was pretty much useless so now I got my arkanoidGame ,pad and ball Class

    I tryed the System.out.println in the addComponentsToPane and it gives me ...
Results 1 to 25 of 41
Page 1 of 2 1 2