Click here to Skip to main content
15,899,935 members
Home / Discussions / Java
   

Java

 
QuestionGet complete URL address on address bar of browser Pin
tannghia21-May-10 20:14
tannghia21-May-10 20:14 
AnswerRe: Get complete URL address on address bar of browser Pin
Richard MacCutchan21-May-10 21:48
mveRichard MacCutchan21-May-10 21:48 
AnswerRe: Get complete URL address on address bar of browser Pin
Gerben Jongerius22-May-10 6:06
Gerben Jongerius22-May-10 6:06 
GeneralRe: Get complete URL address on address bar of browser Pin
tannghia22-May-10 17:36
tannghia22-May-10 17:36 
GeneralRe: Get complete URL address on address bar of browser Pin
Gerben Jongerius22-May-10 21:26
Gerben Jongerius22-May-10 21:26 
GeneralRe: Get complete URL address on address bar of browser Pin
tannghia23-May-10 2:03
tannghia23-May-10 2:03 
GeneralRe: Get complete URL address on address bar of browser Pin
Gerben Jongerius25-May-10 22:37
Gerben Jongerius25-May-10 22:37 
Questionjava game [modified] Pin
aleesya8818-May-10 5:26
aleesya8818-May-10 5:26 
import java.awt.*;<br />
import javax.swing.*;<br />
import java.awt.geom.*;<br />
<br />
public class QuestionA extends JApplet <br />
{    <br />
    public void init() <br />
    {<br />
        PanelLukis panel = new PanelLukis(this);<br />
        getContentPane().add(panel);<br />
    }<br />
}<br />
<br />
class PanelLukis extends JPanel<br />
{<br />
    private int x_axis, y_axis;<br />
    private int squareWidth, squareHeight;<br />
    private int x, y, coordinateX, coordinateY, squareNo;<br />
<br />
    JApplet app;<br />
    public PanelLukis(JApplet a) <br />
    {<br />
        app = a;<br />
        app.setBackground(Color.white);<br />
    }<br />
<br />
    public void paintComponent(Graphics g)<br />
    {<br />
        x_axis = getWidth();<br />
        y_axis = getHeight();<br />
        squareWidth = 50;<br />
        squareHeight = 50;<br />
        <br />
        Graphics2D graphic2d = (Graphics2D) g;<br />
        y = (y_axis -300) / 2;<br />
        <br />
        for(int j = 0; j <= 5; j++)<br />
        {<br />
            x = (x_axis -300) / 2;<br />
            for(int i = 0; i <= 5; i++)<br />
            {<br />
                Rectangle2D.Double square = new Rectangle2D.Double(x, y, squareWidth, squareHeight);<br />
                graphic2d.draw(square);<br />
                x += squareWidth;<br />
            }<br />
            y += squareHeight;<br />
        }<br />
    }<br />
}


this is the board for the game

import java.awt.*;<br />
import javax.swing.*;<br />
<br />
public class blue extends JApplet<br />
{<br />
    public void paint (Graphics g)<br />
    <br />
    {<br />
         g.setColor(Color.blue);<br />
        g.fillOval(0,0,40,40);<br />
                <br />
    }<br />
}


this is the blue ball

import java.awt.*;<br />
import javax.swing.*;<br />
<br />
public class yellow extends JApplet<br />
{<br />
    public void paint (Graphics g)<br />
    <br />
    {<br />
         g.setColor(Color.yellow);<br />
        g.fillOval(0,0,40,40);<br />
                <br />
    }<br />
}


this is yellow ball

import java.awt.*;<br />
import javax.swing.*;<br />
<br />
public class red extends JApplet<br />
{<br />
    public void paint (Graphics g)<br />
    <br />
    {<br />
         g.setColor(Color.red);<br />
        g.fillOval(0,0,40,40);<br />
                <br />
    }<br />
}


this is red ball

i need help in this programming..
i want to make this game similar like this
<a href="http://www.geekin.de/data/public/umsetzung/five_or_more/"><</a>[<a href="http://www.geekin.de/data/public/umsetzung/five_or_more/" target="_blank" title="New Window">^</a>]/code><br />
or like tic-tac-toe..<br />
anyone can help me..<br />
this is my final year project.<br />
i don't know how to integrate the ball and the board to appear in randomly.<br />
<div class="signature"><br />
<div class="modified">modified on Wednesday, May 26, 2010 12:50 PM</div></div>

QuestionExecutable jar Not Running on Mac OS. Pin
002comp17-May-10 20:53
002comp17-May-10 20:53 
AnswerRe: Executable jar Not Running on Mac OS. Pin
002comp19-May-10 2:00
002comp19-May-10 2:00 
GeneralRe: Executable jar Not Running on Mac OS. Pin
Richard MacCutchan19-May-10 2:31
mveRichard MacCutchan19-May-10 2:31 
GeneralRe: Executable jar Not Running on Mac OS. Pin
002comp19-May-10 2:56
002comp19-May-10 2:56 
AnswerRe: Executable jar Not Running on Mac OS. Pin
427748019-May-10 11:27
427748019-May-10 11:27 
GeneralRe: Executable jar Not Running on Mac OS. Pin
002comp19-May-10 19:37
002comp19-May-10 19:37 
Questionneed guidence Pin
sherry9917-May-10 20:03
sherry9917-May-10 20:03 
AnswerRe: need guidence Pin
Richard MacCutchan17-May-10 21:46
mveRichard MacCutchan17-May-10 21:46 
Questionsocket Pin
balakpn17-May-10 11:32
balakpn17-May-10 11:32 
AnswerRe: socket Pin
Richard MacCutchan17-May-10 21:48
mveRichard MacCutchan17-May-10 21:48 
QuestionHow to set java path in coding Pin
002comp14-May-10 18:43
002comp14-May-10 18:43 
AnswerRe: How to set java path in coding Pin
002comp14-May-10 21:39
002comp14-May-10 21:39 
AnswerRe: How to set java path in coding Pin
Richard MacCutchan14-May-10 21:42
mveRichard MacCutchan14-May-10 21:42 
GeneralRe: How to set java path in coding Pin
002comp14-May-10 22:14
002comp14-May-10 22:14 
GeneralRe: How to set java path in coding Pin
002comp15-May-10 0:23
002comp15-May-10 0:23 
GeneralRe: How to set java path in coding Pin
002comp15-May-10 1:38
002comp15-May-10 1:38 
GeneralRe: How to set java path in coding Pin
Richard MacCutchan15-May-10 2:46
mveRichard MacCutchan15-May-10 2:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.