13 Solved Topics

Remove Filter
Member Avatar for StephNicolaou

Hi all, This is also similar to web browsers which use the codes, &d for date, and &l&f&r for document name, etc. I would like to start the page number for 165, for example, is there a code to do this? (For within the print preview/page setup area). I've already …

Member Avatar for StephNicolaou
0
172
Member Avatar for StephNicolaou

Hi, I have a simple query I've used again and again previously, but in this case it's telling me that it is too complex. I've output this sql string into a message and cannot see any problems with the syntax, I'm completely baffled with this one so any help would …

Member Avatar for StephNicolaou
0
85
Member Avatar for StephNicolaou

Hey guys, I have an Jlabel class and trying to simply add it to the panel in my main class. However is nowhere to be seen! No errors are being output so currently have no idea what wrong...unless you can see whether my method is wrong... Jlabel class: [code] public …

Member Avatar for StephNicolaou
0
236
Member Avatar for StephNicolaou

Hey guys, I've seen very limited examples out there about this unsupported function, however I am sure there must be a quick method to get this done with the Affine Transform ? Any ideas appreciated. Cleo

Member Avatar for mKorbel
1
4K
Member Avatar for StephNicolaou

Hey guys, I've drawn a grid, and I have a label contatining a picture. Whenever I change the location of this label, the grid dissapears until I resize/move the frame. Any suggestions on best method to buffer these grid lines? They aren't going to be moving graphics or anything like …

Member Avatar for StephNicolaou
0
154
Member Avatar for StephNicolaou

Hey guys, I'm drawing a grid using the nested for loop with draw line method. Any tips on getting this in the center of my screen? I am currently using the getWidth and getHeight methods of my center panel but it is still drawing in the top left corner. It's …

Member Avatar for StephNicolaou
0
245
Member Avatar for StephNicolaou
Member Avatar for StephNicolaou

Dear all, When printing a grid, for example a chess board, I was hoping it wouldn't have the same output as the console. When I want the position to be grid[x][y] = 5, 5, it will place the counter in the bottom right corner in a 5x5 grid, (5,1) instead …

Member Avatar for StephNicolaou
0
157
Member Avatar for StephNicolaou

Hi all, Trying to simply call method, (below) from another class and return the value found by the scanner. Please see below: [code] public int getInt(String prompt) { System.out.print(prompt + "a"); //int result = in.nextInt(); if (in.hasNextInt()) { x = in.nextInt(); y = in.nextInt(); sum = x+y; System.out.print("sum" + sum); …

Member Avatar for StephNicolaou
0
150
Member Avatar for StephNicolaou

Hi everyone, I'm new to C and have been given a C program to complete but found it includes many versions of the titled error for each class file. Can anyone please explain why it occurs and how I could get rid of them? Thanks, Cleo [code] q2.c:5: error: expected …

Member Avatar for Leo71
0
423
Member Avatar for StephNicolaou

Hi all, Background: I am dealing with graphical objects on a canvas in which the user draws four lines and out of these four lines I get the top left corner, bottom right corner and figure out the width and height from these two points. Problem: I have completed this …

Member Avatar for peter_budo
0
124
Member Avatar for StephNicolaou

I'm trying to show a dialog message if the user clicks a button and a text field is empty. [code=java] Action listener - if(event.getSource() == cmdSaveSettings) if(txtPlayerOneName.getText().equals(emptyText)) { JOptionPane.showMessageDialog(null, "alert", "Please enter player one's name", JOptionPane.ERROR_MESSAGE); } [/code] Ive add an action to listener to the button and the textfield: …

Member Avatar for masijade
0
213
Member Avatar for StephNicolaou

This is a connect four game and I'm trying to show the counter falling. What I have so far is this which is in a for loop: [code] while(fallingCounter == true && x[j][i] < playerTurn) { //Move the counter vertically down the grid's rows appearing to fall fallingCounter(); g.setColor(counterColour); //counterWidth …

0
109

The End.