• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

graphic in java

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all :
we need to do some graphic projects using java , without using its classes .. the main topic about how to store color in memory by taking RGB values
so we should writes a java code to store color values and then draw it in screen ..
can any one help me ?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

What do you mean by "without using its classes"? Are there certain libraries you aren't allowed to use?
 
Ranch Hand
Posts: 136
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In such case you wanna write your own classes for those graphics as you wish and call the RGB values as per your requirement might this link will help you How to’s – Creating RGB color generator using Java
 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That link doesn’t help, I am afraid, because there is no public access to the code.
 
rose dando
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
without using color class to set RGB values . we should build class to take these value and store it in computer memory . the basic about how colors are creation , then to show it and put color pixel in screen ..
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rose dando wrote:without using color class to set RGB values


That seems like an arbitrary restriction. It's also unworkable, as that class (and the Paint interface) is how RGB values are passed to most of AWT's and Swing's drawing routines. There's also little point in trying to avoid using it, as it would be used under the hood (within the AWT/Swing code) anyway. Can you tell us why it should be avoided? This seems like an implementation decision that should be up to the developer.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

rose dando wrote:without using color class to set RGB values . we should build class to take these value and store it in computer memory . the basic about how colors are creation , then to show it and put color pixel in screen ..



You mean write directly to graphics memory? Not possible in Java.
 
rose dando
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This my first task in my graphic course .. i don 't know .. i am also see it impossible .. but that it > thanks all
 
Campbell Ritchie
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you need to go back and ask what it means about not using pre‑existing classes. You may have misunderstood that bit.
 
A wop bop a lu bop a womp bam boom! Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic