
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
04.09.2005, 19:46
|
|||
|---|---|---|---|
Как в JPanel вывести (нарисовать) имадж? |
|||
|
#18+
<subj> спасиба! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.09.2005, 11:32
|
|||
|---|---|---|---|
Как в JPanel вывести (нарисовать) имадж? |
|||
|
#18+
на всю Jpanel ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.09.2005, 11:36
|
|||
|---|---|---|---|
|
|||
Как в JPanel вывести (нарисовать) имадж? |
|||
|
#18+
Самый примитивный способ - это кинуть на нее JLabel, а лейблу назначить иконку. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.09.2005, 11:57
|
|||
|---|---|---|---|
Как в JPanel вывести (нарисовать) имадж? |
|||
|
#18+
Cпасиба. А как потом поверх этого имаджа, в той же панели, наложить наверх, другие имаджи? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
05.09.2005, 12:11
|
|||
|---|---|---|---|
Как в JPanel вывести (нарисовать) имадж? |
|||
|
#18+
int width = 100; int height = 100; // Create buffered image that does not support transparency BufferedImage bimage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); // Create a buffered image that supports transparency bimage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); These examples create buffered images that are compatible with the screen: GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gs.getDefaultConfiguration(); // Create an image that does not support transparency bimage = gc.createCompatibleImage(width, height, Transparency.OPAQUE); // Create an image that supports transparent pixels bimage = gc.createCompatibleImage(width, height, Transparency.BITMASK); // Create an image that supports arbitrary levels of transparency bimage = gc.createCompatibleImage(width, height, Transparency.TRANSLUCENT); A screen compatible buffered image can also be created from a graphics context: public void paint(Graphics g) { Graphics2D g2d = (Graphics2D)g; int width = 100; int height = 100; // Create an image that does not support transparency BufferedImage bimage = g2d.getDeviceConfiguration().createCompatibleImage( width, height, Transparency.OPAQUE); // Create an image that supports transparent pixels bimage = g2d.getDeviceConfiguration().createCompatibleImage( width, height, Transparency.BITMASK); // Create an image that supports arbitrary levels of transparency bimage = g2d.getDeviceConfiguration().createCompatibleImage( width, height, Transparency.TRANSLUCENT); } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=59&mobile=1&tid=2151585]: |
0ms |
get settings: |
8ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
169ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
43ms |
get tp. blocked users: |
2ms |
| others: | 210ms |
| total: | 465ms |

| 0 / 0 |
