How to go to next lines in a label on LWUIT
Hello
I am using J2ME LWUIT to design my application. I take data from web server and display it on screen. I can do it without any problem. Unfortunately when the text is so long, I want Label to go to next line. But it writes all the text at same line.Then the user needs to wait the line to stop to read whole Label. Could you please tell me a way for user to go to next line when the text is long enough ? Thank you in advance.
Regards
Altayli
Here is how I defined my Label:
label9.setText(topkapi.TopkapiAyrinti);
label9.setFocusable(true);
b2.addComponent(label9);
Hello
I fixed "why it always goes to next page problem" by changing KeyPressed() to KeyReleased(). But I still I do not know how to go next lines in a label on LWUIT. I will take very long datas and display it on the screen and when it's more than one line I want the label to go to next line instead of displaying all the info in same line. I am waiting for your replies. I tried nearly all LWUIT functions to find out the solutions but still I could not find anything. Thank you in advance..
Best Regards
Altayli
Similar Messages
-
How to append to next line using RandomAccessFile writeBytes
Hi,
How do you append to the next line using RandomAccessFile with writeBytes()
static public void append(String strfilename, String strRecord)
RandomAccessFile file;
try
file = new RandomAccessFile(new File(strfilename), "rw");
file.seek(file.length());
file.writeBytes(strRecord);
file.close();
catch(Exception e)
System.exit(1);
Thanks,
JohnAt this point there is no next line or return key in SMS or BBM, a lot of people have asked for it. It exists on all the other apps for writing, but not on SMS and BBM. Hopefully BB releases this simple fix for the messaging..
-
Set to new line for each label/text combination ?
Dear All,
Wish to enquire how to set to next line for each label/text combination in relation to the following code ? Please advise.
import java.awt.*;
public class ScanImageForm {
public static void main(String args[]) {
ScanImageForm scanImageForm = new ScanImageForm();
scanImageForm.Display();
public void Display() {
Frame frame = new Frame();
Panel panel = new Panel();
frame.add(panel);
Label labelVehNo = new Label("Vehicle No:");
Label labelDateofLoss = new Label("Date of Loss:");
Label labelImageType = new Label("Image Type:");
Label labelImageDesc = new Label("Image Desc:");
TextField textVehNo = new TextField();
TextField textDateofLoss = new TextField();
TextField textImageType = new TextField();
TextField textImageDesc = new TextField();
textVehNo.setColumns(10);
textDateofLoss.setColumns(10);
textImageType.setColumns(10);
textImageDesc.setColumns(30);
panel.add(labelVehNo, BorderLayout.WEST);
panel.add(textVehNo, BorderLayout.CENTER);
panel.add(labelDateofLoss, BorderLayout.WEST);
panel.add(textDateofLoss, BorderLayout.CENTER);
panel.add(labelImageType, BorderLayout.WEST);
panel.add(textImageType, BorderLayout.CENTER);
panel.add(labelImageDesc, BorderLayout.WEST);
panel.add(textImageDesc, BorderLayout.CENTER);
frame.setSize(500, 500);
frame.setVisible(true);if u want to set label and textfield side by side .
then u have to set The layout is GridLayout().
to ur example
Panel p=new Panel(new GridaLayout(3,2))
means three rows to columns. -
How do you make the sentences you input in a drop down list wrap to the next line?
How do you make the sentences that you input in a drop down list to wrap to the next line?
You can't.
see this thread for more info: Can you set drop down list as multi-line??? -
How to restrict spool data in the next line in pdf print
Hi Experts,
i have spool data which is going to be print in PDF format.
if line is extented..thenit is prining the in the next line..
but that next line is not starting after one tab space.
so how to remove that space.
can anybody give me help.
Regards,
venkatHi,
output is displaying in pdf file in the give format..
ex:-
919 sub 00001 44445 testmater
ial final
here test material is not coming fully in the first line..it is cutting and displaying in 2 lines.
Regards,
venkat -
How can I find the words which spans across end of line to next line in pdf ?
I am using Acrobat Adobe X Pro version for our form development and maintanence. I am writting a Acrobat JAVA batch script which reads through all the words and execute spell check and reports the mispelled words in a excel sheet. Since I am running this script in batch mode for more than 1000 pdfs - I am getting many words joined together. When I looked in to those pdfs all such words are looking okay because it is appearing in end of right margin and the next word is in the next line. Since there was no space between them it was extracted as a single word. Hence the failure.
I used wordf = this.getPageNthWordQuads(i,j) to get the word begin and end coordinates. when I closely observe the values are creating a rectangle and that doesnt span across lines. I got the coordinates for the regular word and the word which span acoross two lines. both of the coordinates are same.
I think I am screwed - I have 8000 such words and no clue of how to get rid of them from the actual misspelled words.
please help. let me know if any class /method if I call will give me the end of line or do I need to go to next layer to find this split.
the addnot is somehow marking the words using this coordinates - please hellp me understand how this works. Thanks.
// for all pages
for (var i = 0; i < this.numPages; i++ )
// For all the words
pg += 1;
numWords = this.getPageNumWords(i);
for ( j = 0; j < numWords; j++)
//get the spell check
ckWord = spell.checkWord(this.getPageNthWord(i,j))
if ( ckWord != null )
jn=0
ml=0
// if mispelled word found.
wordf = this.getPageNthWordQuads(i,j)
swordf = wordf.toString()
var st = swordf.split(",")
var diffx0 = parseInt(st[0])-8
var diffx1 = parseInt(st[1])-8
var diffx2 = parseInt(st[2])-8
var diffx3 = parseInt(st[3])-8
var diffx4 = parseInt(st[4])-8
var diffx5 = parseInt(st[5])-8
var diffx6 = parseInt(st[6])-8
var diffx7 = parseInt(st[7])-8
if (cWord == csword)
jn = 1
if ( st[1] != st[3] )
ml = 1
//dataLine += "\r\n write "
else
ml=2
dataLine += "\r\n"+this.documentFileName
+ "\t" + this.getPageNthWord(i,j)
+ "\t" + pg
+ "\t" + j
+ "\t" + ml
+ "\t" + jn
+ "\t st[0] " + diffx0 + "\t st[1] " + diffx1 + "\t st[2] " + diffx2 + "\t st[3] " + diffx3
+ "\t st[4] " + diffx4 + "\t st[5] " + diffx5 + "\t st[6] " + diffx6 + "\t st[7] " + diffx7
ck=1If Acrobat is reading each word part as separate words, you have a problem.
The way I approached it in some of my tools was to check if a word ends
with a hyphen, and if so, to check if it's the last on the line. If both
conditions are true, combine with the next word on the next line. This is
not fool proof, of course, as there are documents with columns are other
structural elements that prevent this from working. Better than nothing,
though...
However, it is also possible that Acrobat does see both parts as parts of
the same word. In that case, getPageNthWordQuads() will return multiple
quads arrays. As you know, that method returns an array of quad arrays.
There's usually only one, but in principle there could be more... Something
to check before giving up. -
How to separate the Particular field in next line ?
Hi,
i have multipule fields in one line but i want to separate the Particular field in next line how to do this ?
when i am downloading my output downloaded like this
but i want to last field should be newline.
present output:
901 ab 3455 5667 2123 item1 100
902 ab 3455 5667 2123 item2 100
903 ab 3455 5667 2123 item3 100
in that i am taken item1 100 as string i want to new line from item1
but i want like this
experted output:
901 ab 3455 5667 2123
item1 100
902 ab 3455 5667 2123
item2 100
903 ab 3455 5667 2123
item3 100
plz any code for above example.
thanks & regards
sai
Edited by: k sai ram on Jan 9, 2008 5:26 PMHi Sai,
make the layout of your root container as matrix layout
then make item1 as matrix head data.
inset one transparent ui just after first 100. then make this transparent ui as matrix head data.
then make 902 as matrix head data
inset one transparent ui just after second 100. then make this transparent ui as matrix head data.
repeat the same for next set too.
You can also do the same with row layout for root element.
Regards
Sarath
Edited by: Sarath Satheesan on Jan 9, 2008 11:17 AM -
hi
i ahve a problem
in main window there are line items outputed in rows and columns seperated by vertical lines and horizontal lines
now my requriment is that under a column say column3 i want an extra line to display some more data in that column only
how to do it
mean for all columns 1 column2 there will be n othing corresponding to that particlar row only in column3 data will be tehre rest all columns that data will be blank...
my q
wht is command to give next line under for that particlual columns
and what tabs should i put to escape that data coming to columns 1 and columns2 only for column3 it should come
how to give blank space for first two columns and reach the third columns what code to write in form
regards
AroraHi Nishant,
I assume you want the output to be as follows.......
S.No.---- Mat. No----Description
01--A00101---LCD Screens, Monitors,
Computing.
02--A00102---Modems, Networking
03--A00103---Mouse, I/O Devices,
Computing.
The simplest solution for your problem is, for column 3 (here Description), specify a left margin and a right margin. Say, you want the text to be printed at 7 inches from left of the page margin and should end at 10 inches from the page margin, go to paragraph format and create a new one with desired font type and size and specify a left margin with 7 inches and a right margin with 10 inches. The data will be restricted to that particular column and rest of the fields will be printed as per the TABs specified for them.
Hope this clears your problem. If this was helpful, please award points. -
I was typing an email and when I would go to the next line, it will skip two lines instead of one line. How do I correct the problem?
I am not sure I understand the problem. Could you include a screenshot of it right after it happens?
If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
Thank you! -
How to make code in dreamweaver flow to the next line?
The line lengths of my code are really really long. How do I make it automatically flow to the next line without causing it to actually be a new line? Just for viewing purposes. I don't like having to scroll all the way to the end of the line of code to add a close tag.
Hi
Right-click on the area next to the 'box' that has the page title, and select 'coding' to enable the coding toolbar, (appears on the l/h side of the code window) then select the word wrap icon, see image -
PZ -
In Pages it is making words slit in half instead of dropping the whole word down onto the next line. How do I change it so that the whole word goes down?
J,
In the Document Inspector, Document tab, turn off Hyphenate.
Jerry -
I tried this way:
int countitems = 0;
private void SaveToListView()
listView1.BeginInvoke(new MethodInvoker(delegate
using (StreamWriter sw = new StreamWriter(@"c:\listviewfile\databaseEN.txt"))
foreach (ListViewItem item in listView1.Items)
countitems++;
sw.WriteLine("Line Number " + countitems + ": " + item.Text);
for (int i = 1; i < item.SubItems.Count; i++)
sw.WriteLine("Line Number " + (countitems + 1) + ": " + item.SubItems[i].Text);
What i get is:
Line Number 1: הכרויות
Line Number 2: 93
Line Number 2:
Line Number 2: הכרויות לגילאי 30+
Line Number 3: 1365
Line Number 3:
Line Number 3: אהבה ורומנטיקה
Line Number 4: 214
Line Number 4:
Line Number 4: א-מיניים
Line Number 5: 1493
Line Number 5:
Line Number 5: בינו לבינה
Line Number 6: 30
Line Number 6:
Line Number 6: זוגות מעורבים
Line Number 7: 257
Line Number 7:
Line Number 7: זוגיות במשבר
And what i want to get is the first line to be 1 the next line 2 then 3 4 5 6 7...
And the lines that are empty to remove them.
For example Line Number 6:
Should be empty and should be removed.for (int i = 1; i < item.SubItems.Count; i++)
if(item.SubItems[i].Text != "")
countitems++;
sw.WriteLine("Line Number " + (countitems) + ": " + item.SubItems[i].Text); -
How to get text in Next line of Label
Hi,
I am trying to write a code where when I press Enter the text in the text box appear on next line of label. However every new text is getting printed on the same line..
Here is my code:
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class ChatBox extends Applet implements ActionListener
TextField firstNum, secondNum, resultNum;
Label label1;
String str1 = "Start Chatting";
public ChatBox()
//setLayout(new GridLayout(3, 2, 10, 15));
setBackground(Color.cyan);
String message;
message = "Start Typing and see the magic";
setLayout(new GridLayout(2,1,10,120)); //, 10, 15));
setBackground(Color.cyan);
firstNum = new TextField(5);
firstNum.addActionListener(this);
label1 = new Label(firstNum.getText());
add(label1);
add(firstNum);
public void actionPerformed(ActionEvent e)
String newline = System.getProperty("line.separator");
//String message = "Start Typing and see the magic";
str1 = str1+ newline + firstNum.getText();
firstNum.setText("");
//message = message + str1;
label1.setText( str1 );Is it not possible?
Kindly guide with an alternative way to do this. -
Ask about how to append text on next line
I'm writing lingo about log file. For example, i would like
to write like this when a new entry is appended:
etc 3/29/2007 8:34 PM
etc2 3/29/2007 8:34 PM
Here is the lingo:
on mouseUp
if objectP(myFile) then set myFile = 0 -- Delete the
instance if it already exists
myFile = new(xtra "fileio") -- Create an instance of FileIO
openFile(myfile, the moviePath&"try.txt",0) --Open the
file with R/W access
myVariable = readFile(myFile)
setPosition(myfile,getLength(myFile)) -- Set position to end
of file
writeString(myFile, " " & "etc" & " " &
_system.date() & " " & _system.time()) -- Append text to
the file
closeFile (myfile) -- Close the file
myFile = 0 -- Dispose of the instance
end
The problem is the appended text is put together, instead of
a line by a line. In fact, what I want is the appended text is put
into next line everytime, not on the same line. Please help me to
modify it, thanks.Try changing this line:
writeString(myFile, " " & "etc" & " " &
_system.date() & " " &
_system.time()) -- Append text to the file
to
writeString(myFile, " " & "etc" & " " &
_system.date() & " " &
_system.time()&RETURN) -- Append text to the file
Note that if you open the file inNotepad on a PC, it will
look strange
because of the way notepad handles line feeds. You can get
around it by
doing this:
winReturn = NumToChar( 13 ) & NumToChar( 10 )
writeString(myFile, " " & "etc" & " " &
_system.date() & " " &
_system.time()&winReturn) -- Append text to the file -
How to dispaly vendor name to the next line
hi all,
i have made a smartform in which i have created a TEMPLATE.I have created Three column in which in the last column of SECOND RAW i am displaying VENDOR NO and VENDOR NAME.Now my requirement is this, if the name of the vendor is too long that can not be fit in that RAW than it will automatically display to the next line of column and raw
Thanks & Regards,
sappk25thanks
Maybe you are looking for
-
I cannot sync my iphone to new itunes library.
I have the latest update of itunes on both computers and the latest software update on my iPhone 5s. I have recently gotten a new laptop. I have downloaded itunes and transferred my itunes library from my old computer to my new laptop via home sharin
-
Integration of OBIEE, Apache 2.0.52, Weblogic10, Webgate 7.0.4 on Windows I installed the following for this integration. 1. OBIEE (10.1.3.4.x) Installed on JAVA OC4J Container (but deployed to Weblogic) 2. Installed Weblogic 10 SSL enable (infrastru
-
Can the items in this grfx be deleted without harming or hobbling FCP?
SnapZ Pro recently released a revision. It wrecked havoc with my system (and no longer functions). In talking with support, I was told the problem is a group of third party QuickTime components. The person on the phone suggested I delete everythin
-
WLP 8.1 Propagation - SP3
I am trying to run this application to update another server. The first time I ran it, it worked as expected. But now I get the following message when running it: The table "PF_PORTLET_CATEGORY_DEFINITION" is defined in the PDEF file to be pro pagate
-
MacBook Air (2009) with Windows 7
Hello everybody, I use my MacBook Air (2009,1.86GHz Intel Core 2 Duo, 2GB 1067 MHz DDR3, OS X 10.9.3), also with Windows 7 for a software design: ( Rhinoceros 4 (all original softwares). In my case, when I use Windows 7 the temperature of the hardwar