AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

mySQL Database to a TextArea?

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
Rich Wahl
Guest





PostPosted: Tue Aug 24, 2004 9:01 pm    Post subject: mySQL Database to a TextArea? Reply with quote



I have a little program here that uses JDBC to connect to a mySQL
server. (Doesnt connect remotely yet Smile ill cross that bridge when I
get there, still new to sql servers and if everyone needs a user/psw
or whatnot).

My question is as follows, Is there a way that I can 'import' the
formatting of a SQL output (with all the plus's and auto formatting of
columns to accomodate the largest name/number in that column. As of
now, I just have a Label above a TextArea and have the inputs being
read and a constant format as its outputted. (Using tabs and spaces)
But it looks very sloppy, as not all names or values are the same
length.

Is there a documentlistener or outside source that I can get that kind
of formatting? Would really make this program look nicer and not rely
on the length of names and spaces.

Thanks in advance.
Back to top
Lee Fesperman
Guest





PostPosted: Wed Aug 25, 2004 12:14 am    Post subject: Re: mySQL Database to a TextArea? Reply with quote



Rich Wahl wrote:
Quote:

I have a little program here that uses JDBC to connect to a mySQL
server. (Doesnt connect remotely yet Smile ill cross that bridge when I
get there, still new to sql servers and if everyone needs a user/psw
or whatnot).

My question is as follows, Is there a way that I can 'import' the
formatting of a SQL output (with all the plus's and auto formatting of
columns to accomodate the largest name/number in that column. As of
now, I just have a Label above a TextArea and have the inputs being
read and a constant format as its outputted. (Using tabs and spaces)
But it looks very sloppy, as not all names or values are the same
length.

Use a fixed-width font (monospaced) and space filling in the TextArea.

--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)

Back to top
Rich Wahl
Guest





PostPosted: Wed Aug 25, 2004 6:13 am    Post subject: Re: mySQL Database to a TextArea? Reply with quote



Lee Fesperman <firstsql (AT) ix (DOT) netcom.com> wrote

Quote:
Rich Wahl wrote:

I have a little program here that uses JDBC to connect to a mySQL
server. (Doesnt connect remotely yet Smile ill cross that bridge when I
get there, still new to sql servers and if everyone needs a user/psw
or whatnot).

My question is as follows, Is there a way that I can 'import' the
formatting of a SQL output (with all the plus's and auto formatting of
columns to accomodate the largest name/number in that column. As of
now, I just have a Label above a TextArea and have the inputs being
read and a constant format as its outputted. (Using tabs and spaces)
But it looks very sloppy, as not all names or values are the same
length.

Use a fixed-width font (monospaced) and space filling in the TextArea.

That wouldnt doesnt work since the names and values I will be reading
in from the Database are all of different lengths.

Or is there a way to have a text area start at a exact position? I
havent done much work with formatting within a textarea...

Back to top
Lee Fesperman
Guest





PostPosted: Thu Aug 26, 2004 2:52 am    Post subject: Re: mySQL Database to a TextArea? Reply with quote

Rich Wahl wrote:
Quote:

Lee Fesperman <firstsql (AT) ix (DOT) netcom.com> wrote

Rich Wahl wrote:

I have a little program here that uses JDBC to connect to a mySQL
server. (Doesnt connect remotely yet Smile ill cross that bridge when I
get there, still new to sql servers and if everyone needs a user/psw
or whatnot).

My question is as follows, Is there a way that I can 'import' the
formatting of a SQL output (with all the plus's and auto formatting of
columns to accomodate the largest name/number in that column. As of
now, I just have a Label above a TextArea and have the inputs being
read and a constant format as its outputted. (Using tabs and spaces)
But it looks very sloppy, as not all names or values are the same
length.

Use a fixed-width font (monospaced) and space filling in the TextArea.

That wouldnt doesnt work since the names and values I will be reading
in from the Database are all of different lengths.

Your description was vague, so I gave a solution putting everything in a single
TextArea using space filling to line columns up. That will work!

Quote:
Or is there a way to have a text area start at a exact position? I
havent done much work with formatting within a textarea...

Perhaps, you should try your question on comp.lang.java.gui, because it is not actually
database related.

--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.