Results 1 to 6 of 6
- 06-21-2011, 07:02 PM #1
I Need Some Project Improvement Ideas
So just as a fun little side project to help instill what I've learned in the past few chapters of my book I am making a notepad clone.
I don't think its really finished yet, but it has very similar functionality to notepad. Right now I have the following menus and their sub trees.
Does anyone have any ideas on what I could add that would make it better?Java Code:+File -New -Save -Save As -Open +Font Size -5 -6 -7 -8 -9 -10 -12 -14 -16 -18 -20 -22 -24 +Font Type -Sans Serif -Serif -Monospaced -Arial -Calibri -Courier New +Font Style -Plain -Bold -Italic
Right now I'm trying to make it resizeable, and from what I can find on the internet making a JTextArea resizeable on the window is rather long and tedious. If anyone has any ideas on how to accomplish this easier than a GridBagLayout I would be much obliged.Last edited by Dark; 06-21-2011 at 07:19 PM.
- Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
- +Rep people for helpful posts.
- 06-21-2011, 07:15 PM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
You can switch from a jtextarea to a jtextpane, this will allow functionality like a text editor, however; it gets quite a bit more difficult.
As to the resizing issue, what happens if you use a borderlayout? What components do you have besides the text area? The menu bar should stick to the top regardless if you use setJMenuBar.
- 06-21-2011, 07:20 PM #3
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 06-21-2011, 07:43 PM #4
@Sunde does a JTextPane allow individual formatting? Like bolding a selection instead of the whole thing?
@KevinWorkman I want the JTextArea to be the same size as the window at all times. Right now I only have a JTextArea and a MenuBar, but since JTextArea's use columns and rows instead of pixels I have no idea on how to make a simple resizing method. The only one I could find on Google was a GridBoxLayout.- Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
- +Rep people for helpful posts.
- 06-21-2011, 07:53 PM #5
Have you read the API? Have you gone through the tutorial?
Don't try to make a 'simple resizing method' just use an appropriate layout manager.
db
- 06-21-2011, 08:00 PM #6
I haven't read anything about the JTextPane, the first time I heard of it is when Sunde mentioned it. Thus my question, however I will have to look more into it.
Hmm, I added my JTextArea to a JPanel. Are you suggesting that if I use a BorderLayout instead of a FlowLayout it will simply adjust itself whenever I resize my window? Hmm, I didn't think about that. Off to try it out.
EDIT: Thank you very much for the suggestion, I didn't even think about that. Using a BorderLayout would allow me to create a JTextArea without defining a specific set of columns and rows too. I can't believe I forgot about this, seeing as I learned about it right before IO streams and Buffers.Last edited by Dark; 06-21-2011 at 08:04 PM.
- Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
- +Rep people for helpful posts.
Similar Threads
-
Project ideas
By shirshbansal in forum NetworkingReplies: 0Last Post: 05-18-2010, 12:51 PM -
Need ideas and help with my project
By Otakon in forum New To JavaReplies: 7Last Post: 01-28-2010, 09:49 PM -
Need Project Ideas
By javaesh in forum New To JavaReplies: 8Last Post: 08-25-2009, 06:59 PM -
Ideas for Java Project
By mrbharatmehta in forum Advanced JavaReplies: 11Last Post: 03-28-2009, 07:42 AM -
Any Ideas for a Project?
By quddusaliquddus in forum Advanced JavaReplies: 19Last Post: 12-19-2008, 04:22 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks