Модераторы: javastic, AntonSaburov

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Как брать значение с TextField вывод в StringItem, TextField вывод в StringItem 
:(
    Опции темы
gusca
Дата 15.6.2010, 19:21 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 12
Регистрация: 15.6.2010

Репутация: нет
Всего: нет



Добрий день или вечер мне нужно написати програму на мови j2ME для телефона чтоби ми вставляем 2 TextField и 1 StringItem и 1 кнопка. мне надо чтобы било вписуем в 2 TextField числа нажимаем кнопку общетать и чтоби вивело в StringItem
PM MAIL   Вверх
sanboll
Дата 16.6.2010, 12:05 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 59
Регистрация: 15.6.2010

Репутация: 1
Всего: 1



Извини, я что-то не понял, что именно нужно сделать?  smile 

Привожу пример:

Как получить текст с TextField'a :

Код

TextField tf = new TextField("title", "inital text", 100, TextField.NUMERIC); 
// 100 - это вместимость (100 знаков), title - заголовок, initalText - текст по умолчанию, а NUMERIC - ввод только чисел (я так понял, нужно чтобы ТОЛЬКО числа вводились).

...

String str = tf.getString(); // в строке str находится то, что пользователь ввёл в TextField.


Задать текст в StringItem:
Код

StringItem stritem = new StringItem("Label", "Inital text"); // пометку (Label) уже нельзя будет изменить, второй параметр (initalText) - текст по умолчанию.

...

String str = ... ; // в строке str должен содержаться новый текст StringItem'a
stritem.setText(str);


A в чем смысл проги? Извини если я не понял. 

PM MAIL   Вверх
gusca
Дата 17.6.2010, 09:37 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 12
Регистрация: 15.6.2010

Репутация: нет
Всего: нет



sanboll, мне просто нада знать как брать значение с TextFielda и виводити в stringItem

Добавлено через 11 минут и 52 секунды
Код

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hello;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
/**
 * @author }{@табич
 */
public class HelloMIDlet extends MIDlet implements CommandListener {

    private boolean midletPaused = false;

    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">
    private Command exitCommand;
    private Command backCommand;
    private Form form;
    private StringItem stringItem;
    private TextField textField;
    //</editor-fold>

    /**
     * The HelloMIDlet constructor.
     */
    public HelloMIDlet() {
    }

    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">
    /**
     * Initilizes the application.
     * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
     */
    private void initialize() {
        // write pre-initialize user code here
 
        // write post-initialize user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Started point.
     */
    public void startMIDlet() {
        // write pre-action user code here
        switchDisplayable(null, getForm());
        // write post-action user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
     */
    public void resumeMIDlet() {
        // write pre-action user code here
 
        // write post-action user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">
    /**
     * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
     * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
     * @param nextDisplayable the Displayable to be set
     */
    public void switchDisplayable(Alert alert, Displayable nextDisplayable) {
        // write pre-switch user code here
        Display display = getDisplay();
        if (alert == null) {
            display.setCurrent(nextDisplayable);
        } else {
            display.setCurrent(alert, nextDisplayable);
        }
        // write post-switch user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">
    /**
     * Called by a system to indicated that a command has been invoked on a particular displayable.
     * @param command the Command that was invoked
     * @param displayable the Displayable where the command was invoked
     */
    public void commandAction(Command command, Displayable displayable) {
        // write pre-action user code here
        if (displayable == form) {
            if (command == backCommand) {
                // write pre-action user code her
 
                // write post-action user code here
            } else if (command == exitCommand) {
                // write pre-action user code here
                exitMIDlet();
                // write post-action user code here
            }
        }
        // write post-action user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand ">
    /**
     * Returns an initiliazed instance of exitCommand component.
     * @return the initialized component instance
     */
    public Command getExitCommand() {
        if (exitCommand == null) {
            // write pre-init user code here
            exitCommand = new Command("Exit", Command.EXIT, 0);
            // write post-init user code here
        }
        return exitCommand;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: form ">
    /**
     * Returns an initiliazed instance of form component.
     * @return the initialized component instance
     */
    public Form getForm() {
        if (form == null) {
            // write pre-init user code here
            
            form = new Form("Welcome", new Item[] { getStringItem(), getTextField() });
            form.addCommand(getExitCommand());
            form.addCommand(getBackCommand());
            form.setCommandListener(this);
            // write post-init user code here
        }
        return form;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand ">
    /**
     * Returns an initiliazed instance of backCommand component.
     * @return the initialized component instance
     */
    public Command getBackCommand() {
        if (backCommand == null) {
            // write pre-init user code here
            backCommand = new Command("\u041E\u041A", Command.OK, 0);
            // write post-init user code here
        }
        return backCommand;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem ">
    /**
     * Returns an initiliazed instance of stringItem component.
     * @return the initialized component instance
     */
    public StringItem getStringItem() {
        if (stringItem == null) {
            // write pre-init user code here
            stringItem = new StringItem("stringItem", null);
            // write post-init user code here
        }
        return stringItem;
    }
    //</editor-fold>


    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField ">
    /**
     * Returns an initiliazed instance of textField component.
     * @return the initialized component instance
     */
    public TextField getTextField() {
        if (textField == null) {
            // write pre-init user code here
            textField = new TextField("textField", null, 32, TextField.ANY);
            // write post-init user code here
        }
        return textField;
    }
    //</editor-fold>


    /**
     * Returns a display instance.
     * @return the display instance.
     */
    public Display getDisplay () {
        return Display.getDisplay(this);
    }

    /**
     * Exits MIDlet.
     */
    public void exitMIDlet() {
        switchDisplayable (null, null);
        destroyApp(true);
        notifyDestroyed();
    }

    /**
     * Called when MIDlet is started.
     * Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet.
     */
    public void startApp() {
        if (midletPaused) {
            resumeMIDlet ();
        } else {
            initialize ();
            startMIDlet ();
        }
        midletPaused = false;
    }

    /**
     * Called when MIDlet is paused.
     */

    
    public void pauseApp() {
        midletPaused = true;
    }

    /**
     * Called to signal the MIDlet to terminate.
     * @param unconditional if true, then the MIDlet has to be unconditionally terminated and all resources has to be released.
     */
    public void destroyApp(boolean unconditional) {
    }

}



Як мени в цей код вставити чтоби брало значение с TextField и виводило в StringItem при нажати на команду Command "ОК".
PM MAIL   Вверх
sanboll
  Дата 17.6.2010, 11:09 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 59
Регистрация: 15.6.2010

Репутация: 1
Всего: 1



Извини, но я в твоем коде не разобрался.
А как оно должно работать, если в форму не добавлена команда 'OK'?
;)
Вот пример:

Код

package hello;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class HelloMIDlet extends MIDlet implements CommandListener {

    private Command exitCommand; 
    private Display display;
    private Command okCommand;
    private TextField textField;
    private StringItem stringItem;
    private Form form;

    public HelloMIDlet() {
        display = Display.getDisplay(this);
        okCommand = new Command("OK", Command.OK, 1);
        exitCommand = new Command("Exit", Command.EXIT, 2);
        textField = new TextField("textField", null, 32, TextField.ANY);
        stringItem = new StringItem("StringItem", null);
        display = Display.getDisplay(this);
        form = new Form("Welcome");
        form.append(stringItem);
        form.append(textField);
        form.addCommand(okCommand);    // добавляет команду 'OK' в форму
        form.addCommand(exitCommand);
        form.setCommandListener(this);     
        display.setCurrent(form);
    }

    public void startApp() {
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }

    public void commandAction(Command c, Displayable s) {
        if (c == exitCommand) {
            destroyApp(false);           // выход
            notifyDestroyed();
        }
        else if(c == okCommand)
        {
            String text = textField.getString();     // в строке text содержимое textField
            stringItem.setText(text);                 
        }
    }

}


PM MAIL   Вверх
gusca
Дата 17.6.2010, 12:52 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 12
Регистрация: 15.6.2010

Репутация: нет
Всего: нет



Уменя в коде вот так команда "ОК" називаетса

Код

//<editor-fold defaultstate="collapsed" desc=" Generated Getter: backCommand ">
    /**
     * Returns an initiliazed instance of backCommand component.
     * @return the initialized component instance
     */
    public Command getBackCommand() {
        if (backCommand == null) {
            // write pre-init user code here
            backCommand = new Command("\u041E\u041A", Command.OK, 0);
            // write post-init user code here
        }
        return backCommand;
    }
    //</editor-fold>

PM MAIL   Вверх
sanboll
  Дата 17.6.2010, 13:13 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 59
Регистрация: 15.6.2010

Репутация: 1
Всего: 1



А почему она называется backCommand (back - это ''назад'' все-таки) ?
PM MAIL   Вверх
gusca
Дата 17.6.2010, 13:22 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 12
Регистрация: 15.6.2010

Репутация: нет
Всего: нет



Мне нада сделать так я вожу 2 числа любих в два TextField и когда нажимаем на кнопку "ОК" должно вивести результа в stringItem.

Код

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hello;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * @author Вадим
 */
public class HelloMIDlet extends MIDlet implements CommandListener {

    private boolean midletPaused = false;

    //<editor-fold defaultstate="collapsed" desc=" Generated Fields ">
    private Command exitCommand;
    private Command okCommand;
    private Form form;
    private TextField textField;
    private TextField textField1;
    private StringItem stringItem;
    //</editor-fold>

    /**
     * The HelloMIDlet constructor.
     */
    public HelloMIDlet() {
    }

    //<editor-fold defaultstate="collapsed" desc=" Generated Methods ">
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: initialize ">
    /**
     * Initilizes the application.
     * It is called only once when the MIDlet is started. The method is called before the <code>startMIDlet</code> method.
     */
    private void initialize() {
        // write pre-initialize user code here
 
        // write post-initialize user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: startMIDlet ">
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Started point.
     */
    public void startMIDlet() {
        // write pre-action user code here
        switchDisplayable(null, getForm());
        // write post-action user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: resumeMIDlet ">
    /**
     * Performs an action assigned to the Mobile Device - MIDlet Resumed point.
     */
    public void resumeMIDlet() {
        // write pre-action user code here
 
        // write post-action user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: switchDisplayable ">
    /**
     * Switches a current displayable in a display. The <code>display</code> instance is taken from <code>getDisplay</code> method. This method is used by all actions in the design for switching displayable.
     * @param alert the Alert which is temporarily set to the display; if <code>null</code>, then <code>nextDisplayable</code> is set immediately
     * @param nextDisplayable the Displayable to be set
     */
    public void switchDisplayable(Alert alert, Displayable nextDisplayable) {
        // write pre-switch user code here
        Display display = getDisplay();
        if (alert == null) {
            display.setCurrent(nextDisplayable);
        } else {
            display.setCurrent(alert, nextDisplayable);
        }
        // write post-switch user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">
    /**
     * Called by a system to indicated that a command has been invoked on a particular displayable.
     * @param command the Command that was invoked
     * @param displayable the Displayable where the command was invoked
     */
    public void commandAction(Command command, Displayable displayable) {
        // write pre-action user code here
        if (displayable == form) {
            if (command == exitCommand) {
                // write pre-action user code here
                exitMIDlet();
                // write post-action user code here
            } else if (command == okCommand) {
                // write pre-action user code here
 
                // write post-action user code here
            }
        }
        // write post-action user code here
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: exitCommand ">
    /**
     * Returns an initiliazed instance of exitCommand component.
     * @return the initialized component instance
     */
    public Command getExitCommand() {
        if (exitCommand == null) {
            // write pre-init user code here
            exitCommand = new Command("Exit", Command.EXIT, 0);
            // write post-init user code here
        }
        return exitCommand;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: form ">
    /**
     * Returns an initiliazed instance of form component.
     * @return the initialized component instance
     */
    public Form getForm() {
        if (form == null) {
            // write pre-init user code here
            form = new Form("Welcome", new Item[] { getTextField(), getTextField1(), getStringItem() });
            form.addCommand(getExitCommand());
            form.addCommand(getOkCommand());
            form.setCommandListener(this);
            // write post-init user code here
        }
        return form;
    }
    //</editor-fold>



    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: okCommand ">
    /**
     * Returns an initiliazed instance of okCommand component.
     * @return the initialized component instance
     */
    public Command getOkCommand() {
        if (okCommand == null) {
            // write pre-init user code here
            okCommand = new Command("OK", Command.OK, 0);
            // write post-init user code here
        }
        return okCommand;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField ">
    /**
     * Returns an initiliazed instance of textField component.
     * @return the initialized component instance
     */
    public TextField getTextField() {
        if (textField == null) {
            // write pre-init user code here
            textField = new TextField("textField", null, 32, TextField.ANY);
            // write post-init user code here
        }
        return textField;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: textField1 ">
    /**
     * Returns an initiliazed instance of textField1 component.
     * @return the initialized component instance
     */
    public TextField getTextField1() {
        if (textField1 == null) {
            // write pre-init user code here
            textField1 = new TextField("textField1", null, 32, TextField.ANY);
            // write post-init user code here
        }
        return textField1;
    }
    //</editor-fold>

    //<editor-fold defaultstate="collapsed" desc=" Generated Getter: stringItem ">
    /**
     * Returns an initiliazed instance of stringItem component.
     * @return the initialized component instance
     */
    public StringItem getStringItem() {
        if (stringItem == null) {
            // write pre-init user code here
            stringItem = new StringItem("stringItem", null);
            // write post-init user code here
        }
        return stringItem;
    }
    //</editor-fold>

    /**
     * Returns a display instance.
     * @return the display instance.
     */
    public Display getDisplay () {
        return Display.getDisplay(this);
    }

    /**
     * Exits MIDlet.
     */
    public void exitMIDlet() {
        switchDisplayable (null, null);
        destroyApp(true);
        notifyDestroyed();
    }

    /**
     * Called when MIDlet is started.
     * Checks whether the MIDlet have been already started and initialize/starts or resumes the MIDlet.
     */
    public void startApp() {
        if (midletPaused) {
            resumeMIDlet ();
        } else {
            initialize ();
            startMIDlet ();
        }
        midletPaused = false;
    }

    /**
     * Called when MIDlet is paused.
     */
    public void pauseApp() {
        midletPaused = true;
    }

    /**
     * Called to signal the MIDlet to terminate.
     * @param unconditional if true, then the MIDlet has to be unconditionally terminated and all resources has to be released.
     */
    public void destroyApp(boolean unconditional) {
    }

}



Только я пишу код за допомогою конструктора NetBeans IDE 6.8


Вот у меня 1 TextField:

Код

public TextField getTextField() {
        if (textField == null) {
            // write pre-init user code here
            textField = new TextField("textField", null, 32, TextField.ANY);
            // write post-init user code here
        }
        return textField;
    }



Вот у меня 2 TextField1:

Код

public TextField getTextField1() {
        if (textField1 == null) {
            // write pre-init user code here
            textField1 = new TextField("textField1", null, 32, TextField.ANY);
            // write post-init user code here
        }
        return textField1;
    }


Вот у меня StringItem:

Код

public StringItem getStringItem() {
        if (stringItem == null) {
            // write pre-init user code here
            stringItem = new StringItem("stringItem", null);
            // write post-init user code here
        }
        return stringItem;
    }


Вод команда "Ок":
Код

    public Command getOkCommand() {
        if (okCommand == null) {
            // write pre-init user code here
            okCommand = new Command("OK", Command.OK, 0);
            // write post-init user code here
        }
        return okCommand;
    }


Добавлено через 51 секунду
sanboll, Я виложил новий код чуть выше
PM MAIL   Вверх
eugine_s
Дата 17.6.2010, 13:50 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 581
Регистрация: 14.11.2007
Где: Киев

Репутация: 17
Всего: 17



Ужас какие люди неливые. 
Ну открой книгу, почитай чуть-чуть. А то добрался до IDE, она ему всего нагенерировала, а что нагенерировала - хз и даже прочитать коменты не может. 

В твоем коде тебе нужно вставить всего 3-5 строк кода. 

Код

    //<editor-fold defaultstate="collapsed" desc=" Generated Method: commandAction for Displayables ">
    /**
     * Called by a system to indicated that a command has been invoked on a particular displayable.
     * @param command the Command that was invoked
     * @param displayable the Displayable where the command was invoked
     */
    public void commandAction(Command command, Displayable displayable) {
        // write pre-action user code here
        if (displayable == form) {
            if (command == okCommand) {
                // write pre-action user code her
               String t1 = textItem.getText();
               String t2 = textItem1.getText();
               stringItem.setText(t1 + t2); // вместо t1 + t2 поставь свой результат.
                // write post-action user code here
            } else if (command == exitCommand) {
                // write pre-action user code here
                exitMIDlet();
                // write post-action user code here
            }
        }
        // write post-action user code here
    }
    //</editor-fold>



Это сообщение отредактировал(а) eugine_s - 17.6.2010, 13:52
PM MAIL   Вверх
gusca
Дата 17.6.2010, 13:56 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 12
Регистрация: 15.6.2010

Репутация: нет
Всего: нет



у меня в етих строчках 

Код

    String t1 = textItem.getText();
    String t2 = textItem1.getText();


ошибки выбывае

Добавлено через 1 минуту и 20 секунд
eugine_s, какую ты  книжку читал
PM MAIL   Вверх
eugine_s
Дата 17.6.2010, 14:25 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 581
Регистрация: 14.11.2007
Где: Киев

Репутация: 17
Всего: 17



Цитата(gusca @  17.6.2010,  13:56 Найти цитируемый пост)
у меня в етих строчках 

    String t1 = textItem.getText();
    String t2 = textItem1.getText();

ошибки выбывае


а как у тебя эти поля называются? 

Цитата(gusca @  17.6.2010,  13:56 Найти цитируемый пост)
eugine_s, какую ты  книжку читал 


Какую я читал - не имеет значение, а тебе советую: "Java для полнейших чайников или программирование для тех, кто не любит остановиться и подумать."

PM MAIL   Вверх
gusca
Дата 17.6.2010, 14:37 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 12
Регистрация: 15.6.2010

Репутация: нет
Всего: нет



 я чуть вишесь код програми виложил посотри
PM MAIL   Вверх
eugine_s
Дата 17.6.2010, 14:52 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 581
Регистрация: 14.11.2007
Где: Киев

Репутация: 17
Всего: 17



Цитата(gusca @  17.6.2010,  14:37 Найти цитируемый пост)
 я чуть вишесь код програми виложил посотри


Жесть.  smile 
Я знаю, как у тебя называется. 
PM MAIL   Вверх
gusca
Дата 17.6.2010, 15:07 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 12
Регистрация: 15.6.2010

Репутация: нет
Всего: нет



eugine_s, можеш написать и скинуть код. Ти извини что я чуть туплю я просто начал изучать J2ME. Можкш посовктовать книгу. чтоюи там в ней било расписани библиотеки, класи все что стосуэтся j2me.  
PM MAIL   Вверх
eugine_s
Дата 17.6.2010, 17:07 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 581
Регистрация: 14.11.2007
Где: Киев

Репутация: 17
Всего: 17



Цитата(gusca @  17.6.2010,  15:07 Найти цитируемый пост)
можеш написать и скинуть код

Могу, но не буду. 
Причина - этот раздел форума называется j2me и относятся сюда вопросы по j2me. А вопросы "напиши прогу" относятся к разделу "Работа". 

На самом деле уже тут все написано, все что тебе нужно это изменить имена двух полей (переменных). Проще вообще ничего не бывает - ни только в java, да вообще в любом программировании. 

Цитата(gusca @  17.6.2010,  15:07 Найти цитируемый пост)
Ти извини что я чуть туплю я просто начал изучать J2ME. Можкш посовктовать книгу. чтоюи там в ней било расписани библиотеки, класи все что стосуэтся j2me.   


j2me я тебе точно не советую изучать сейчас. Тут и с обычной java будут большие проблемы (если переменную переименовать не можешь). 

Посоветовать могу - любую книжку по Java для начинающих, какая именно книжка не будет иметь значения, так как тебе нужны самые самые азы. 
PM MAIL   Вверх
sanboll
  Дата 17.6.2010, 18:04 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Шустрый
*


Профиль
Группа: Участник
Сообщений: 59
Регистрация: 15.6.2010

Репутация: 1
Всего: 1



Я сначала и не въехал, что именно нужно сделать...
PM MAIL   Вверх
Ответ в темуСоздание новой темы Создание опроса

  • Прежде чем задать вопрос прочтите это!
  • Литература по Java находится здесь.
  • Литературу по Java обсуждаем здесь.
  • Используйте теги [code=java][/code] для подсветки кода. Используйтe чекбокс "транслит" (возле кнопок кодов) если у Вас нет русских шрифтов.
  • Действия модераторов можно обсудить здесь
  • С просьбами о написании курсовой, реферата и т.п. обращаться сюда

  • FAQ раздела лежит здесь!
 
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Java ME (J2ME) | Следующая тема »


 




[ Время генерации скрипта: 0.0618 ]   [ Использовано запросов: 21 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.