# Picking with JAVA2D

**URL:** <https://discourse.processing.org/t/picking-with-java2d/859>\
**Category:** Libraries\
**Created:** [June 11, 2018, 1:52am UTC](https://discourse.processing.org/t/picking-with-java2d/859 "2018-06-11T01:52:13Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [June 19, 2018, 12:26am UTC](https://discourse.processing.org/t/picking-with-java2d/859/3 "2018-06-19T00:26:00Z")

</div>

The source code for Picking is very compact – you can find it here:

> **[nclavaud/picking](https://github.com/nclavaud/picking/tree/master/src/picking)**
>
> Processing Library Template for Eclipse. Contribute to nclavaud/picking development by creating an account on GitHub.

At first glance, it looks like the dependency on P2D / P3D (OpenGL) is in Buffer.java – specifically, the use of PShader (31) and the fact that Buffer extends PGraphics3D (33):

> <https://github.com/nclavaud/picking/blob/master/src/picking/Buffer.java#L30-L34>

As @TfGuy44 mentioned, you could write your own false-color buffer from scratch (copy the picking concept). As an alternative, you could fork Picking and write your own `Buffer` that extends `PGraphicsJava2D` instead.

---

_[View the full topic](https://discourse.processing.org/t/picking-with-java2d/859)._
