Added Bold and Italic buttons - #24
Merged
Merged
Conversation
pH-7
reviewed
Feb 4, 2018
|
|
||
| } | ||
| else{ | ||
|
|
pH-7
requested changes
Feb 4, 2018
|
|
||
| } | ||
|
|
||
| else if (e.getSource() == italicButton) { | ||
| if(textArea.getFont().getStyle() == Font.ITALIC){ | ||
| textArea.setFont(textArea.getFont().deriveFont(Font.PLAIN)); | ||
|
|
|
|
||
| } | ||
| else{ | ||
|
|
| else if (e.getSource() == boldButton) { | ||
| if(textArea.getFont().getStyle() == Font.BOLD){ | ||
| textArea.setFont(textArea.getFont().deriveFont(Font.PLAIN)); | ||
|
|
| saveFile(); | ||
| }// If the source of the event was the "Bold" button | ||
| else if (e.getSource() == boldButton) { | ||
| if(textArea.getFont().getStyle() == Font.BOLD){ |
Owner
There was a problem hiding this comment.
Could you add a space after if to be if (textArea.getFont()
|
|
||
| textArea.setFont(textArea.getFont().deriveFont(Font.BOLD)); | ||
| } | ||
|
|
|
|
||
| textArea.setFont(textArea.getFont().deriveFont(Font.ITALIC)); | ||
| } | ||
|
|
pH-7
reviewed
Feb 4, 2018
|
|
||
| // Set the initial size of the window | ||
| setSize(700, 500); | ||
| setSize(800, 500); |
Owner
There was a problem hiding this comment.
Is there a reason why you change the size..? Didn't it fit with the changes..?
Contributor
Author
There was a problem hiding this comment.
The new buttons make the font size area dissapear, so i increased the window's size
Owner
|
Hi @gpasents Thanks a lot for contributing! Highly appreciate! 😃 Please see my reviews. |
pH-7
requested changes
Feb 4, 2018
| aboutMe, aboutSoftware, wordWrap; | ||
| private final JToolBar mainToolbar; | ||
| JButton newButton, openButton, saveButton, clearButton, quickButton, aboutMeButton, aboutButton, closeButton; | ||
| JButton newButton, openButton, saveButton, clearButton, quickButton, aboutMeButton, aboutButton, closeButton,boldButton,italicButton; |
Owner
There was a problem hiding this comment.
Can you add a space after the comma to be as closeButton, boldButton, italicButton;
Owner
|
Great! Thanks alot @gpasents and see you hopefully another time. Take care! 😃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added the buttons and images for bold and italic options for fonts