Jump to content

Notifications in a java program

- - - - -

  • Please log in to reply
4 replies to this topic

#1
rapidcybey

rapidcybey

    Newbie

  • Members
  • Pip
  • 8 posts
Hi i want some help regarding notifications in a java program

well im currently doing a project and i want to know how to show notifications in the program.

example : like if one user does some change to the content of something then a notification like a red bubble should appear in the program hope you get what i am trying to say

how can i achieve ok another example for latest updates of some content of the program we need to notify to the users na how can i do that in java :D like
facebook email notification that comes with a red box somthing like that how can i do it ..

regards

#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
You'll have to be more specific. When you say, "how to show notifications in the program," are you asking how to produce the visual representation of the notifications in your GUI, and if so, what toolkit are you using? Swing or SWT? Or, is your question about how to detect the changes that the user would be making that would result in a notification being generated? Again, if this is the case, what kind of changes are you trying to detect?
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3
rapidcybey

rapidcybey

    Newbie

  • Members
  • Pip
  • 8 posts
well ya you are kinda correct im using netbeans to do my project like i mentioned before i need to make sure that the user will get latest updates of the changes hmmm like in facebook where when we have a new mail there would be a red bubble or so to notify the user that he/she has a new message i want something like that basically in my program the admin will assign projects to employees in the company and then to notify this to the user i want a graphical way like the bubble thing hope you got it :)

thanks for the reply really appreciate it

regards

#4
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
If you're speaking strictly about the visual context here, I would draw your bubble in your drawing program of choice, and load it as an ImageIcon class, and apply it to a JLabel. If you want to superimpose text over it as is the case with Facebook notifications, you could get the graphics context of the JLabel with getGraphics() and then draw your text using drawString().

Here's a tutorial on using ImageIcons with JLabels to get you started:
How to Use Labels (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#5
rapidcybey

rapidcybey

    Newbie

  • Members
  • Pip
  • 8 posts
hmmm i guess i could try this thanks for the tute bro ill check it out and ill post back if i have any problem :) really appreciate youre time on this post thanks a lot

regards




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users