Search:

Type: Posts; User: alpvii

Search: Search took 0.10 seconds.

  1. Replies
    1
    Views
    1,470

    Sorting substring?

    Here is my code:


    import java.util.Arrays;

    import javax.swing.*;

    public class childNameAge {
    public static void main(String[] args) {
    int numberOfChildren;
  2. Replies
    5
    Views
    1,568

    Re: Can't get seven random numbers, only one.

    Here are some more of the code. I thought that was the problem, that the last number is the number that is going to display. So I think, that I have to store all seven numbers in a string? or char?...
  3. Replies
    5
    Views
    1,568

    Can't get seven random numbers, only one.

    I want my program to show seven random numbers, but it does only display one. I got this in a class:


    if (command.equals("Random numbers")) {
    int tal = modell.getTal();...
  4. Replies
    6
    Views
    2,204

    Re: Make my code follow MVC

    I do not really know what I should put in the model-class. Here is an example of an program's model-class:


    public class Model {
    private String text;
    public String getRad(){
    text="Nu var det...
  5. Replies
    6
    Views
    2,204

    Re: Make my code follow MVC

    I have now done some seperating and this is the result:

    The View class:


    import javax.swing.*;

    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
  6. Replies
    6
    Views
    2,204

    Re: Make my code follow MVC

    I want this code to be in the MVC-model. MVC stands for Model-View-Control. You should have the graphics for the program in the view-class, and the code for doing operations in the control-class. The...
  7. Replies
    6
    Views
    2,204

    Make my code follow MVC

    I want to have my program in three classes according to the MCV-model. The problem is that I cannot manage to do it right, cause it won't start and other things. This is the code when it is NOT in...
  8. Replies
    1
    Views
    3,311

    Tic-Tac-Toe in SWT

    How do I create the buttons with an array? I am going to do a Tic-Tac-Toe game in SWT. I guess this way is wrong?:



    import org.eclipse.swt.layout.*;
    import org.eclipse.swt.widgets.*;
    import...
Results 1 to 8 of 8