Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (521)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Netbeans - Problems Changing Code Colors  (Read 1034 times)
0 Members and 1 Guest are viewing this topic.
Offline tyeeeee1
« Posted 2013-02-18 19:00:26 »

Hey, I've finally started to attempt to figure out how to use Netbeans and I'm trying to get the colors to look like they do in Notepad++ which I'm used to using. So-far I've managed to get the text looking mostly right but I'm not sure what to change to change the things that the arrows are pointing at in the picture below. If you know which settings are used to change these please, tell me. ^.^

Picture: http://imgur.com/kCO7yPs


Edit: Oh, and what is that weird pink line for?
Offline PixelPop

Senior Newbie




Wootage to you!


« Reply #1 - Posted 2013-02-18 19:07:37 »

I believe netbeans highlights all occurrences of whatever variable etc you have selected. The pink line is the margin at which your code gets wrapped, once it exceeds it.

May you live as long as you want, but never want as long as you live.
Offline tyeeeee1
« Reply #2 - Posted 2013-02-18 19:09:32 »

I believe netbeans highlights all occurrences of whatever variable etc you have selected. The pink line is the margin at which your code gets wrapped, once it exceeds it.

Is there a way to get rid of that line, it looks ugly and kind of annoy me for some odd reason. I'll check the highlighting options to change the other stuff then; thanks!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline PixelPop

Senior Newbie




Wootage to you!


« Reply #3 - Posted 2013-02-18 19:11:48 »

I believe netbeans highlights all occurrences of whatever variable etc you have selected. The pink line is the margin at which your code gets wrapped, once it exceeds it.

Is there a way to get rid of that line, it looks ugly and kind of annoy me for some odd reason. I'll check the highlighting options to change the other stuff then; thanks!

I dont think you can turn it off as such, but you can set its colour to the background colour which will hide it

May you live as long as you want, but never want as long as you live.
Offline tyeeeee1
« Reply #4 - Posted 2013-02-18 19:34:39 »

I've managed to figure out mostly all of the colors now, but this one ( http://imgur.com/71souTR ) I still can't find the field to edit. Any idea where it might be?
Offline PixelPop

Senior Newbie




Wootage to you!


« Reply #5 - Posted 2013-02-18 19:44:16 »

 Try going to "Tools -> Options -> Editor -> Highlighting" and uncheck the "Keep Marks" option.

May you live as long as you want, but never want as long as you live.
Offline tyeeeee1
« Reply #6 - Posted 2013-02-18 19:51:31 »

Try going to "Tools -> Options -> Editor -> Highlighting" and uncheck the "Keep Marks" option.

That seems to have fixed it, thanks again!
Offline PixelPop

Senior Newbie




Wootage to you!


« Reply #7 - Posted 2013-02-18 19:55:42 »

Try going to "Tools -> Options -> Editor -> Highlighting" and uncheck the "Keep Marks" option.

That seems to have fixed it, thanks again!

No probs, glad I could help  Smiley

May you live as long as you want, but never want as long as you live.
Offline tyeeeee1
« Reply #8 - Posted 2013-02-18 20:02:44 »

Since I don't want to flood this section with threads about NetBeans I'll just ask all my questions in this thread if/when I get any more.

My last remaining question atm is a bit confusing. I just recently learned about packages and how to use them and they look to be working except that two out of five or so .java files are showing an error that makes no sense. As far as I can tell it's saying that the .java file isn't located within the player folder which is inside of the thing folder; the problem is that the .java file is there so this error shouldn't show up.

What NetBeans looks like with the error:
http://imgur.com/Ynvzh0l

What my folder looks like:
http://imgur.com/wSWlrQ6
Offline PixelPop

Senior Newbie




Wootage to you!


« Reply #9 - Posted 2013-02-18 20:51:44 »

I think the error is that your character class is not inside thing.player package, but actually inside thing.player.<default package>. Move your classes outside of the default package. i think you are supposed to replace the default package.

May you live as long as you want, but never want as long as you live.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline PixelPop

Senior Newbie




Wootage to you!


« Reply #10 - Posted 2013-02-18 20:58:49 »

Actually, it looks like you have more than one source packages/folder. Player, skills and enemy are source folder. You should create all your packages within "Source Packages" so it woud look like:

Source Packages
     Player
         Character
     Skills
         Skills
     Enenmy
         Alien etc

May you live as long as you want, but never want as long as you live.
Offline tyeeeee1
« Reply #11 - Posted 2013-02-18 21:34:38 »

I managed to fix everything after manually re-creating all the packages and copy/pasting all my code in, thanks.
Offline tyeeeee1
« Reply #12 - Posted 2013-02-21 16:59:03 »

Just ran into another Netbeans problem, I'll just CnP my post from another site here if anyone can figure out what's going on.

I'm currently attempting to figure out how to use a Derby database in java. So-far I've been reading through this (Java For Complete Beginners - Databases) tutorial and I'm kinda-sorta sure that I've done most of this right but I'm a bit stuck at the moment.

So-far my code looks like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
import java.sql.*;

public class DataBaseTest
{

    public static void main(String args[])
    {
        int id = 1;
       
        try
        {
            String host = "jdbc:derby://localhost:1527/Test Database";
            String uName = "removedTheUsername";
            String uPass = "removedThePassword";
            Connection dbConnection = DriverManager.getConnection( host, uName, uPass);
           
            Statement statement = dbConnection.createStatement();
            String sql = "SELECT * FROM TESTTABLE";
            ResultSet resultSet = statement.executeQuery(sql);
           
            for(int i = 0; i < id; i++)
            {
                resultSet.next();
                if(i == id)
                {
                    System.out.println(resultSet.getInt(1) + " " + resultSet.getString(2) + " " +resultSet.getInt(3));
                }
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }
}  


It's pretty mush just mashed together since I'm still figuring this all out. The error that I'm getting is:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
run:
java.sql.SQLSyntaxErrorException: Schema 'TYEEEEE1' does not exist
   at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source)
   at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
   at org.apache.derby.client.am.Statement.executeQuery(Unknown Source)
   at DataBaseTest.main(DataBaseTest.java:19)
Caused by: org.apache.derby.client.am.SqlException: Schema 'TYEEEEE1' does not exist
   at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
   at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
   at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
   at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
   at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
   at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
   at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
   at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
   at org.apache.derby.client.am.Statement.executeQueryX(Unknown Source)
   ... 2 more
BUILD SUCCESSFUL (total time: 0 seconds)


The database is named 'Test Database' and the table I'm trying to access is called 'TESTTABLE'.
I've checked out line 19 where the first error says something is going wrong but I don't know enough about half of these statements to figure out what's going wrong. If anyone can see where I went wrong and explain how to fix it that would help.
Offline sproingie

JGO Kernel


Medals: 202



« Reply #13 - Posted 2013-02-21 17:09:18 »

http://db.apache.org/derby/faq.html#schema_exist

FYI, you should probably start another topic for this totally separate thing.   Oh and BTW I'd stay away from spaces in database identifiers, like "Test Database", because database scripts are notorious for not quoting things properly.
Offline tyeeeee1
« Reply #14 - Posted 2013-02-21 17:52:46 »

http://db.apache.org/derby/faq.html#schema_exist

FYI, you should probably start another topic for this totally separate thing.   Oh and BTW I'd stay away from spaces in database identifiers, like "Test Database", because database scripts are notorious for not quoting things properly.


I'll probably do that on my next question, I didn't want to have a bunch of threads all made by me asking questions.

Edit: Fixed my problem.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xFryIx (52 views)
2014-11-13 12:34:49

digdugdiggy (34 views)
2014-11-12 21:11:50

digdugdiggy (28 views)
2014-11-12 21:10:15

digdugdiggy (23 views)
2014-11-12 21:09:33

kovacsa (46 views)
2014-11-07 19:57:14

TehJavaDev (50 views)
2014-11-03 22:04:50

BurntPizza (49 views)
2014-11-03 18:54:52

moogie (65 views)
2014-11-03 06:22:04

CopyableCougar4 (63 views)
2014-11-01 23:36:41

DarkCart (148 views)
2014-11-01 14:51:03
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!