473,695 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

J2ME scrolling canvas?

Hi,

Is there any way that I can scroll a canvas - i.e. if there are too many
items on the canvas you can still access by pressing down. I know Form does
this (apparently) but I need to do it using a canvas!. Maybe I can attach my
Canvas to a form?

Ideas?
Oz.
Jul 17 '05 #1
6 17290
Oz Mortimer <oz@o-tec.tv> wrote:
Is there any way that I can scroll a canvas - i.e. if there are too many
items on the canvas you can still access by pressing down. I know Form does
this (apparently) but I need to do it using a canvas!.i
You have to do it programmaticall y yourself. A Canvas represents the
physical display area of the device on which it's running. If you have
more items than can be displayed on the physical screen, then you have
to draw your own scroll bars and handle determining what items to render
on the physical display.
Maybe I can attach my
Canvas to a form?


No. You can't mixed the hi-level widgets with the low-level widgets in
MIDP 1.0. With MIDP 2.0 you will have the CustomItem, but with MIDP 1.0
you're not able to mix programmer designed widgets with the LCDUI
widgets.

--
Darryl L. Pierce <mc******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Jul 17 '05 #2
Wow!... I can't believe that J2ME doesn't cater for that!. Has anyone got
any examples? is there a scrollbar class?

Oz.
"Darryl L. Pierce" <mc******@myrea lbox.com> wrote in message
news:83******** *************** *******@news.te ranews.com...
Oz Mortimer <oz@o-tec.tv> wrote:
Is there any way that I can scroll a canvas - i.e. if there are too many
items on the canvas you can still access by pressing down. I know Form does this (apparently) but I need to do it using a canvas!.i


You have to do it programmaticall y yourself. A Canvas represents the
physical display area of the device on which it's running. If you have
more items than can be displayed on the physical screen, then you have
to draw your own scroll bars and handle determining what items to render
on the physical display.
Maybe I can attach my
Canvas to a form?


No. You can't mixed the hi-level widgets with the low-level widgets in
MIDP 1.0. With MIDP 2.0 you will have the CustomItem, but with MIDP 1.0
you're not able to mix programmer designed widgets with the LCDUI
widgets.

--
Darryl L. Pierce <mc******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"

Jul 17 '05 #3


Oz Mortimer wrote:

Wow!... I can't believe that J2ME doesn't cater for that!. Has anyone got
any examples? is there a scrollbar class?

Oz.
"Darryl L. Pierce" <mc******@myrea lbox.com> wrote in message
news:83******** *************** *******@news.te ranews.com...
Oz Mortimer <oz@o-tec.tv> wrote:
Is there any way that I can scroll a canvas - i.e. if there are too many
items on the canvas you can still access by pressing down. I know Form does this (apparently) but I need to do it using a canvas!.i


You have to do it programmaticall y yourself. A Canvas represents the
physical display area of the device on which it's running. If you have
more items than can be displayed on the physical screen, then you have
to draw your own scroll bars and handle determining what items to render
on the physical display.
Maybe I can attach my
Canvas to a form?


No. You can't mixed the hi-level widgets with the low-level widgets in
MIDP 1.0. With MIDP 2.0 you will have the CustomItem, but with MIDP 1.0
you're not able to mix programmer designed widgets with the LCDUI
widgets.

--
Darryl L. Pierce <mc******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"


Look at JScrollPane
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94 (206)544-5225
Jul 17 '05 #4
In comp.lang.java. programmer Fred L. Kleinschmidt <fr************ *****@boeing.co m> wrote:
: Oz Mortimer wrote:

:> Wow!... I can't believe that J2ME doesn't cater for that!. Has anyone got
:> any examples? is there a scrollbar class?

[...]

: Look at JScrollPane

No JScrollPane in J2ME.

There are GUI toolkits for J2ME - e.g. the kAWT: http://www.kawt.de/

That has a ScrollPane class - and a MIDP version.
--
__________
|im |yler http://timtyler.org/ ti*@tt1.org
Jul 17 '05 #5
Oz Mortimer <oz@o-tec.tv> wrote:
Wow!... I can't believe that J2ME doesn't cater for that!.
It's a low-level graphic canvas. The MIDP 1.0 spec has it rendering for
the physical display. With MIDP 2.0, there's a new GameCanvas class that
can define a graphical area larger than the physical display and uses
the physical display as a portal.
Has anyone got
any examples?
Check out the Lightweight Windowing Toolkit and OWT.
is there a scrollbar class?


No. But, if there were, you wouldn't be able to use it in the Canvas;
you can't mix high-level and low-level graphic components in the MIDP.

--
Darryl L. Pierce <mc******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Jul 17 '05 #6
Fred L. Kleinschmidt <fr************ *****@boeing.co m> wrote:
Look at JScrollPane


No such class in the MIDP. He's not talking about J2SE, but J2ME/MIDP.

--
Darryl L. Pierce <mc******@myrea lbox.com>
Visit the Infobahn Offramp - <http://bellsouthpwp.ne t/m/c/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4055
by: Sveta | last post by:
Hi, all! I am new with J2ME. I have application that has form with 2 commands (exit and select). All UI uses are high level API, and it is very important to leave it high-level. This application works fine on some devices. But at Samsung mobile phone, I have a problem. In this phone my 2 commands appear under menu command, and then I can
0
1477
by: Jason D Wolfe | last post by:
If this is not appropriate for this newsgroup I apologize in advance, please direct me to the appropriate group... I have created a canvas object and set it as the current displayable in the current display. The command listner is the class that I created and called the canvas object from. I added commands to the canvas, to be caught by the commandListener (which is set to the class that created the canvas). The problem is this......
1
15898
by: namratapatil | last post by:
Hi...i am trying to load an image that has been saved at the following path: C:\WTK22\apps\MyProject\res After exectuing the program, the NullPointerException is thrown...Kindly let me know how to load the image without any exceptions being thrown... import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class ImmutableImageExample extends MIDlet { private Display display; private MyCanvas canvas;
4
11480
by: D | last post by:
I'm sure this is a simple question to the Tkinter experts - I have a very basic Tkinter application that consists of 1 master window and buttons within that window. My problem is that, I need to be able to scroll (up and down) when I get to the point that the buttons go off the screen. What's the easiest way to do this? Thanks in advance.
1
2191
by: blackielawless | last post by:
Hi, My question is about scrolling canvas under Tkinter, I have a canvas of size 1280X800, where my plotting is way beyond the 1280,I need to add scroller bars H & V and be able to use them to pan around my image. Any help please Best regards
1
8728
by: charlesvc | last post by:
Hallo I am working on web design on mobile. So i came to know for webpage in html or xhtml needs to be parsed to show on mobile So my doubt is the parsing will give only tags text and source etc. only, we have simulate it as a web page in canvas. I want to know whether my idea is correct or not. I found PocketLearn J2ME HTML Component. Here my doubt is whether the package webserver with this is available for dowload to use...
1
1772
by: soumengoswami | last post by:
Hi, Is there any way to scrool a canvas?I know in forms. But when i works in Canvas it is not worked. If anybody know the answer plz help me.
3
2321
by: jaxx0rr | last post by:
This will probably look like a really stupid piece of code.. but it works My question is, how can I write the last part so there is only one extended Canvas class that can recieve a parameter for the image number Thanks import java.io.IOException; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener;
0
8638
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8854
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8831
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4584
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3013
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2278
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1979
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.