Robin Thapa

Greenhorn
+ Follow
since Aug 23, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Robin Thapa

Dear,

Well not much idea into it, though i use a feed and i am giving you a link, hope it can be useful to u.
Have a lookSYNC
14 years ago
Dear Mr. Gurung,

I am not very clear with your question. Anyways i too had similar problem in my earlier project.
I followed this link.
Hope you get something out of it for your usefulness..
webpage
14 years ago
Dear Mr. Gurung,

Do you mean how do send data over HTTP to a web-application running on a J2EE server?

Robin

14 years ago
Dear Sir,

My Project is a simple one.
I have to build the interface using canvas.
and almost all the interface is done, except when an menu item is clicked , it should display a textfield where a client can enter some inputs.

I have almost done it.

I did as you said in the earlier post.
Can i fill some color on the form so that the UI is inconsistency.

Please help me.
If you give me ure email id i would like to share my project with you.

Thanking you,

Robin Thapa

14 years ago
Dear Sir,

Now i came into a big problem........... everything accomplished as i wanted.
But i read that we cannot create a textfield in a canvas.
So how do i accomplish it?
When user selects a list, i want them to enter something.
So how do i use a textfield in canvas?
or how can i create a textfield in canvas?please help me

Robin Thapa
14 years ago
The above problem is actually sloved.

Thank you
14 years ago
Dear Sir,

I have done it to some extend and im now able to navigate through the list.
I got into a small problem,

public void commandAction(Command c, Displayable d) {
if (c == backCommand) {
CanvasListMidlet.quitApp();
} else if (c == selectCommand) {
if (selectedIndex == 0) {
/// here i wish to call another canvas which consists of another List as in the examples class as:MessagesMenuScreen
// i tried calling another canvas class but i am not able to get it done.
// please help me

}
}
}


Your's
Robin Thapa
14 years ago

Peter Miklosko wrote:Have look at this example, it is not pretty but it show how it can be done



Dear Sir,

I am really thankful to you for your help and Support.
14 years ago

Peter Miklosko wrote:When you start screen make one of the option highlighted-selected by default (draw rectangle with perhaps different colour then background and change style of text, bolder, different colour or font), have variable that holds a data on currently selected option. Create method for traverse and rest should be easy to finish once you know which option is selected.

PS: there is small difference on returned button press between emulator and real device. One return for example UP and the other Up. So watch out for these...




Could you please just help me with my codes just to select the image? i mean can you help me to make a button kind of over those three......
14 years ago
Dear All,

I have two java classes here.

------------------------------------------------------------------------------------
Services.java


-----------------------------------------------------------------------------------
TCanvas.java


------------------------------------------------------------------------------------


The problem i have here is i can display the image but i have a problem to navigate through the images&text .ie in the emulator it displays (image and Text).
For eg in emulator i can see:
--------------------------------------
Services
About Us
Contact Us

Exit Show
-------------------------------------------
Now i want to use a keyPressed(int keyCode);
but how do i do that, coz my image is on canvas and im not being able to use the above keyPressed(int keyCode) method.

Please help me.

Robin Thapa
14 years ago
Dear All,

I have two java classes here.

------------------------------------------------------------------------------------
Services.java

public class Services extends MIDlet {

Display display;
private TCanvas canvas = new TCanvas(this);

public Services() {
}

public void startApp() {
Display.getDisplay(this).setCurrent(canvas);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
notifyDestroyed();
}
}
-----------------------------------------------------------------------------------
TCanvas.java

public class TCanvas extends Canvas implements CommandListener {


private Image headerImage = null;
private Image ServiceListImage = null;
private Image contactUsImage = null;
private Image aboutUsImage = null;
public Services parent;
private Command exit, select;
List list;

public TCanvas(Services midlet) {
parent = midlet;
exit = new Command("Exit", Command.EXIT, 0);
addCommand(exit);
select = new Command("Select", Command.SCREEN, 1);
addCommand(select);
setCommandListener(this);


}

protected void paint(Graphics g) {
drawBackground(g);

}

public void drawBackground(Graphics g) {
g.setColor(0x584BA5);
try {
headerImage = Image.createImage("/images/header.png");
serviceListImage = Image.createImage("/images/logo1.png");
aboutUsImage = Image.createImage("/images/logo2.png");
contactUsImage = Image.createImage("/images/logo3.png");
} catch (java.io.IOException e) {
throw new RuntimeException("Unable to load Image: " + e);
}
g.fillRect(0, 0, getWidth(), getHeight());
g.drawImage(headerImage, 0, 0, Graphics.LEFT | Graphics.TOP);
g.drawImage(serviceListImage, 0, 60, 0);
g.setColor(255, 255, 255);
g.drawString("Services", 23, 60, Graphics.LEFT | Graphics.TOP);
g.drawImage(aboutUsImage, 0, 87, 0);
g.setColor(255, 255, 255);
g.drawString("About Us", 23, 90, Graphics.LEFT | Graphics.TOP);
g.drawImage(contactUsImage, 0, 117, 0);
g.setColor(255, 255, 255);
g.drawString("Contact Us", 23, 120, Graphics.LEFT | Graphics.TOP);

}

public void commandAction(Command c, Displayable d) {
if (c == exit) {
parent.destroyApp(true);
}
}
------------------------------------------------------------------------------------


The problem i have here is i can display the image but i have a problem to navigate through the images&text .ie in the emulator it displays (image and Text).
For eg in emulator i can see:
--------------------------------------
Services
About Us
Contact Us

Exit Show
-------------------------------------------
Now i want to use a keyPressed(int keyCode);
but how do i do that, coz my image is on canvas and im not being able to use the above keyPressed(int keyCode) method.

Please help me.

Robin Thapa
14 years ago