NEED HELP!!!How to make LINES Colorful--PLEASE HELP!!!!!!
i want to draw a red line:
Graphics g;
g = b.getGraphics();
g.drawLine(20,5,100,64);
but the line is black, i want it red.
the command g.setColor(color.RED) is not working....
WHATS WRONG, please help, thanks thomas
Here is my code....
mport com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
import com.ms.wfc.html.*;
import com.ms.awt.*;
* Diese Klasse kann eine variable Anzahl von Parameter auf der Befehlszeile
* entgegennehmen. Die Programmausf�hrung startet mit der Methode main(). Der
* Klassenkonstruktor wird nicht aufgerufen, bevor nicht ein Objekt vom Typ 'exel'
* in der Methode main() erstellt wird.
public class exel extends Form
String datum2="";
String userdateinput="";
int count=0;
int i=0;
int day7=0;
int m=0;
int p=0;
public exel()
super();
for (i=0;i<31;i++)
Point[count]="305";
Graphics g;
int xx1=5;
int xy1=305;
int xx2=600;
int xy2=305;
int yx1=5;
int yy1=5;
int yx2=5;
int yy2=305;
int i=0;
//Bitmap b = new Bitmap("c:\\BACKGROUND.BMP");
Bitmap b = new Bitmap(600,600);
b.setTransparentColor(Color.RED);
g = b.getGraphics();
g.drawRect(0,0,600,600);
g.drawRect(0,0,600,600);
g.setBackColor(Color.RED);
g.setColor(Color.RED);//HERE IS THE ERROR!!!
g.drawLine(5,10,5,305);
g.drawLine(5,10,10,10);
g.drawLine(xx1,xy1,xx2,xy2);
for (i=0;i<5;i++)
yx1=5;
yy1=60+yy1;
yx2=10;
yy2=yy1;
g.drawLine(yx1,yy1,yx2,yy2);
for (i=0;i<31;i++)
xx1=xx1+15;
xy1=305;
xx2=xx1;
xy2=300;
g.drawLine(xx1,xy1,xx2,xy2);
int h=0;
int counter7=0;
yx1=-10;
int counter8=0;
int counter6=0;
for (h=1;h<31;h++)
int cpoint=com.ms.wfc.util.Value.toInt(Point[h-1]);
int cpoint2=com.ms.wfc.util.Value.toInt(Point[h]);
yy1=305-(cpoint*3);
yy2 = 305-(cpoint2*3);
yx1=yx1+15;
yx2 = yx1+15;
if (cpoint==0)
yy1 = 0;
yy2 = 0;
yx1 = 0;
yx2 = 0;
if (cpoint2==0)
yy1 = 0;
yy2 = 0;
yx1 = 0;
yx2 = 0;
g.drawLine(yx1,yy1,yx2,yy2);
if (cpoint==0)
for (counter6=0;counter6<counter7;counter6++)
yx1=yx1+15;
yx2 = yx1+15;
if (cpoint2==0)
for (counter8=0;counter8<counter7;counter8++)
yx1=yx1+15;
yx2 = yx1+15;
counter7++;
pictureBox1.setImage(b);
// Erforderlich f�r die Unterst�tzung des Visual J++-Formulardesigners
initForm();
// ZU ERLEDIGEN: F�gen Sie beliebigen Konstruktorcode hinter den Aufruf von initForm hinzu
* exel �berl�dt dispose, damit es die Komponentenliste
* bereinigen kann.
public void dispose()
super.dispose();
components.dispose();
String DATUM="";
private void start_click(Object source, Event e)
/**DATE**/
java.util.Date Date = new java.util.Date();
java.sql.Date sqldate = new java.sql.Date(Date.getTime());
String dat = String.valueOf(sqldate);
//datum.setText(DATUM);
//Start von EXEL
try
String makro="C:\\Program Files\\Microsoft Office\\Office\\XLSTART\\PERSONL.xls";
String cmd = "C:\\Temp\\"+DATUM+"FLIP.xls";
//String cmd = "C:\\Program Files\\Microsoft Office\\Office\\EXCEL.EXE Gr8galry.gra";
String line = null;
Process p1 = Runtime.getRuntime().exec(cmd);
Process p2 = Runtime.getRuntime().exec(makro);
//p.destroy();
catch (java.io.IOException e1)
//exception.setText("error");
String Point[]=new String[31];
private void button1_click(Object source, Event e)
close();
}
Similar Messages
-
free cloud storage and unlimited access keeps popping up why and how to make it stop please help?
Safari
Go step by by step and test.
Quit Safari.
Force Quit if you have to.
Hold the shift key down and relaunch Safari.
Reset Safari.
Click Safari in the menu bar.
From the drop down select "Reset Safari".
Uncheck the boxes beside all items.
Just check the box beside “Remove all website data”.
Click "Reset".
Empty Caches
Safari > Preference > Advanced
Checkmark the box for "Show Develop menu in menu bar".
Develop menu will appear in the Safari menu bar.
Click Develop and select "Empty Caches" from the dropdown.
Turn off Extensions if any, and launch Safari.
Safari > Preferences > Extensions -
Spry Accord. Panel - How to make it closed Please help!
Hi, I would like to ask for your help with the following:
I made a spry accord. panel. I was wondering how to make the first tab being closed when I open up the following page. Somehow when I made it, it created that the first tab stays open all the time. I was wondering if I can make it being closed and only open when I click on the Artisan Collection.
Thank you so much for your help in advance! Agi
Here is the link and you will see the panel on the left handside:
http://mallinfurniture.com/browse_c01.htmlHi,
Thank you so much for the answers. I tried what you recommended. An error message came up saying the following. Also, I noticed something weird in my coding... Maybe that is why it is not working. I copy the coding as well. Thank you so much for taking the time to help me out!!!
Error message: "This document contains JavaScript code for a widget that no longer exists. If you don't remove the code, the browser might display JavaScript errors when loading the page. Would you like Dreamweaver to find all the instances of this code for you?" Ok, No.
When I click on Ok. Nothing happens. What am I doing wrong?
Coding - the end of my page:
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("CatalogMenu", {defaultPanel: params.panel ? params.panel: 0});
//-->
</script>
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: -1 }); //--> </script> </body>
</html>
It looks like I have double of that. When I removed the first accordion, all of my panels were opened...
What could ne wrong?
Thank you! Agi -
How to make recursive query.Please help
Dear Experts:
I want to retrieve all employees located in a department in addition to all other employees located in the child's nodes of this department too.
Problem Details:
I have "Employees" table and "Departments" Table
The structure of Dept Table is:
ID primary key
parent_dept foreign key(id)
deptname varchar2
deptType varchar2
The Employee table structure is
ID primary key
dept_id foreign key(Department.id)
empName varchar2Sample data for departments
ID : 1
parent_dept : null
deptname: General Manager office
deptType : 'GM'
ID :=2
parent_dept : 1
deptname: Information tech.
deptType : 'DPT'
ID :=3
parent_dept : 2
deptname: Software Development
deptType : 'SECTION'Sample Data for employees
ID : 101
dept_id :1
empName King
ID : 102
dept_id :2
empName ALAN
ID : 103
dept_id :2
empName SAM
ID : 104
dept_id :3
empName JANEI want to create a query that accepts a parameter "p_department_id" and returns All employees on the following conditions
1- In case the parameter value is null , then retrieve All Employees "king - alan- sam-jane"
2- In Case the parameter value is 1 , then retrieve all the employees under department id =1 in addition to all the employees located under the children departments.
in this case it will be "king - alan- sam-jane"
3- In case parameter value is 2 , then return all the employees under department id =2 in addition to all the employees located under the children departments.
In this case it will be " alan- sam-jane"
4- In case parameter value is 3 , then return all the employees under department id =3 in addition to all the employees located under the children departments.
in this case it will be only "JANE"
In brief , If I pass any value to the parameter :p_department_id , I want to retrieve all employees located in this department in addition to other employees located in the child's nodes of this department id
I use oracle database 11g release 2
Please help me
Thanks
Edited by: ta**** on Apr 3, 2013 5:56 PM
Edited by: ta**** on Apr 3, 2013 5:58 PMSQL> variable p_department_id number
SQL> exec :p_department_id := null
PL/SQL procedure successfully completed.
SQL> with employees as (
2 select 101 id,1 dept_id,'King' empName from dual union all
3 select 102,2,'ALAN' from dual union all
4 select 103,2,'SAM' from dual union all
5 select 104,3,'JANE' from dual
6 ),
7 departments as (
8 select 1 id,null parent_dept,'General Manager office' deptname,'GM' deptType from dual union all
9 select 2,1,'Information tech.','DPT' from dual union all
10 select 3,2,'Software Development','SECTION' from dual
11 )
12 select *
13 from employees
14 where dept_id in (
15 select id
16 from departments
17 start with (
18 (
19 :p_department_id is null
20 and
21 parent_dept is null
22 )
23 or
24 id = :p_department_id
25 )
26 connect by parent_dept = prior id
27 )
28 /
ID DEPT_ID EMPN
101 1 King
102 2 ALAN
103 2 SAM
104 3 JANE
SQL> exec :p_department_id := 1
PL/SQL procedure successfully completed.
SQL> /
ID DEPT_ID EMPN
101 1 King
102 2 ALAN
103 2 SAM
104 3 JANE
SQL> exec :p_department_id := 2
PL/SQL procedure successfully completed.
SQL> /
ID DEPT_ID EMPN
102 2 ALAN
103 2 SAM
104 3 JANE
SQL> exec :p_department_id := 3
PL/SQL procedure successfully completed.
SQL> /
ID DEPT_ID EMPN
104 3 JANE
SQL> SY. -
How to make a jar please help...this is urgent.
hi guys, as you know i am a novice programer...I need to make a jar in order to reuse some of my servlet. but how I do that...please be kind to give me the instruction
novice programerhi guys, as you know i am a novice programer...I need
to make a jar in order to reuse some of my servlet.
but how I do that...please be kind to give me the
instruction
novice programerTry these links:
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/jar.html
http://java.sun.com/docs/books/tutorial/jar/ -
A previous and unrelated text always appears when I need to send a new text. This prevens forwarding texts also, which I need to do all the time for my businss. How can I fix? Please help?
Hi,
This sounds like it is about Window positions.
iChat has Default places for Incoming Invites.
Video is always top Center of your Screen
Audio and Text chats are Upper right with the Audio slightly lower than Text Chats.
Secondary invites are sort of Stacked like when you open multiple files from the same App.
Your outgoing Windows are "Remembered" as to where the last one was when you used it.
This can be an issue if you use your Mac with a second display and turn Off Mirroring.
You windows can get "left" on the other screen.
Go to System Preferences > Displays and turn On Mirroring and the windows should come back to one Screen/display.
If this does not help go to your Home Folder/Library/Preferences and delete (Drag to Trash) com.apple.ichat.plist and restart iChat.
Unfortunately you will need to reset any iChat Preferences you have changed from defaults.
10:42 PM Tuesday; April 26, 2011
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb( 10.6.7)
, Mac OS X (10.6.7),
"Limit the Logs to the Bits above Binary Images." No, Seriously -
i forgot my icloud account and my email how can i recover it please help me icloud maker and icloud password and username holder
If you don't know your ID, you can try to find it as explained here: http://support.apple.com/kb/HT5625. Then you can reset the password as explained here: http://support.apple.com/kb/PH2617. Of course, you can only do this if it's your ID.
-
this device is not longer eligible for creating a free i cloud accounting on my Iphone 5s , my old not working now cannot opened again just when i try make a free email this Message showed up how i can fix it
please help me
iPhone 5s, iOS 8.3Create a new AppleID on a different iOS device or on a computer. You will
then be able to use that newly created AppleID on your iPhone. -
I forgot my password for Encrypt my Backup how can I reset that please help I really need it Urgently?
If you do not know the passcode then you cannot use the backup
Sorry -
hello everyone, i need Mongolian keyboard layout, how can i find it, please help me, my pc is version OS X Yosemite, 10.10.2
CLICKY CLICK---> Multilingual Mac
-
I had my iphone5s in my shorts and my shorts went in the salt water at the beach and was wondering how to fix it or how much is it for another one. Im only 13 and we all make mistakes so please help 18 jan
Sorry, iPhones exposed to Salt Water, are pretty much destroyed. Salt Water is one of the most corrosive elements there is.
Make an appointment at any Apple store & they will do an out of warranty exchange for US $269. -
I seem to have lost carrier settings on my iPad1,I've tried a restore and update but get a message about the original sim card,which I still have but is inactive,really inconvenient as I can only use in wifi spots and off line mode,please help,sibear.
You might want to download something called an undelete utility. These can find files and recover them even after they appear to have been lost. There are some undelete utility programs that are free. Look at tucows.com
Also, it appears that you have POSSIBLY overwritten the actual files, which you moved manually, with I don't know what, which you moved in PSE's folder location view.
Next, in the future ... NEVER (that's: don't even think about it) move your photos in Windows. NEVER. NEVER. Not ever. Not once. This always (that's ALWAYS, as in 100% of the time) causes problems and usually makes things difficult to fix.
Lastly ... make regular backups! I must say this in the forums about seventy bazillion times a month. Make regular backups! Regular depends on how often you take photographs and edit them. Since my photographic activity usually happens on the weekends, I make backups every Sunday night. You may need a different schedule, depending on your activity level. MAKE REGULAR BACKUPS! -
I recently moved and I got a new sim but I still use my old sim. I want to use both numbers for iMessage and FaceTime but i have absolutely no idea how to do it! please help me! I have a macbook pro and iphone 5
lewbobber wrote:
Basically i need to either take it to a shop that can unlock i.e. £40.00
Be aware, you go that route & every time you try to update or restore, it will error out, leaving your phone unusable. Not to mention, you void all warranty/support.
Sell it & use the proceeds towards an officially unlocked iPhone bought directly from Apple.
Good luck. -
i cannot download free apps via the App Store...i get an error message that asks me to enter my credit card information... i wish not to enter my credit card info until i want to purchase something, and to download free apps, i do not believe i should need to enter credit card info.
Please help me correct my Apple ID account so that i can download free apps.
thank you so muchThis user, mountaingoatgirl, explains how to get a None option in your account details in the iTunes app on a Mac or PC. -
https://discussions.apple.com/message/24907941 -
i have a macbook thats running lion, and i want to take an iso i have on the mac and put it on my pc, i know i need to reformat it to work on macs, but i need to put it on a pc, please help!
Creative Cloud Help | Creative Cloud / Common Questions
"Can I use the software I download from Creative Cloud on more than one machine?
Yes. Creative Cloud desktop applications can be downloaded and installed on multiple computers, regardless of operating system. However, activation is limited to two machines per individual associated with the membership. See the terms of use for more information. Learn how to deactivate a Creative Cloud license on a machine."
Maybe you are looking for
-
Trying to script some actions in Photoshop
Hi, first time poster, so bear with me a bit. I haven't used AppleScript since I was a kid in the days of Classic, when basically everything could be recorded, and have just started trying to play with it in OSX today. Actually typing out what you wa
-
re: Motion 5 can you view text outside of the canvas? as when using the view menu you can see animation paths, bounding boxes and handles??? I'm in the middle of a text animation design treatment and unless my memory is completely failing I thought t
-
Write to serial port asyncronously
I am trying to write a commands to a serial port but my problem is that the operation is tedious so it is freezing up my UI. What makes it more complicated is that I must call this procedure when the form loads I want to ask if anyone can provide an
-
Using runtime constant $TimeSent
$TimeSent puts a Z at the end of the timestamp of the system time. 1.What is the Z? 2. How do I get rid of the Z? Thanks Chirag
-
Updated iPod software, now it can't find 100 songs of my music.
It cannot fine the origional file for 100 songs? If I go into my music folder, itunes music, I can find all the songs. What happened!!??